JavaScript模块随意拖动
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>JavaScript模块随意拖动</title>
<style type="text/css">
html{
width:100%;
overflow-x:hidden;
}
body{
font-family: Trebuchet MS, Lucida Sans Unicode, Arial, sans-serif;
width:100%;
margin:0px;
padding:0px;
text-align:center;
background-color:#E2EBED;
font-size:0.7em;
overflow-x:hidden;
}
#mainContainer{
width:600px;
margin:0 auto;
text-align:left;
background-color:#FFF;
}
h4{
margin:0px;
}
p{
margin-top:5px;
}
#dragableElementsParentBox{
padding:10px;
}
.smallArticle,.bigArticle{
float:left;
border:1px solid #000;
background-color:#DDD;
padding:2px;
margin-right:10px;
margin-bottom:5px;
}
.smallArticle img,.bigArticle img{
float:left;
padding:5px;
}
.smallArticle .rightImage,.bigArticle .rightImage{
float:right;
}
.smallArticle{
width:274px;
}
.bigArticle{
width:564px;
}
.clear{
clear:both;
}
#rectangle{
float:left;
border:1px dotted #F00;
background-color:#FFF;
}
#insertionMarker{
width:6px;
position:absolute;
display:none;
}
#insertionMarker img{
float:left
相关文档:
做Java开发的人都知道,在Java中有XXXFormat(比如SimpleDateFormat)类可以帮助我们得到想要的数据格式.在JavaScript中没有这样的东西,所以我们需要用另一种方法得到我们想要的东西.代码如下:
<html>
<head>
<title>Test</title>
<mce:script type="text/javascript" language="javascri ......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD id="Head1">
<title>JavaScript调用本地命令</title>
<script type="text/javascript">
function exec (command)
{
window.oldOnError = window.onerror;
window._command = command;
window. ......
http://203.208.39.132/search?q=cache:CS7gmmmKO1UJ:cdivilly.wordpress.com/2008/09/05/debugging-javascript-on-internet-explorer-mobile/+mobile+ie+debug&cd=2&hl=zh-CN&ct=clnk&gl=cn&client=firefox-a&st_usg=ALhdy2_5z6wqB0HLfTGoC9EDfEwpnra-LQ ......
concat
将两个或多个字符的文本组合起来,返回一个新的字符串。
var a = "hello";
var b = ",world";
var c = a.concat(b);
alert(c);
//c = "hello,world"
indexOf
返回字符串中一个子串第一处出现的索引(从左到右搜索)。如果没有匹配项,返回 -1 。
var index1 = a.indexOf(& ......