2011年5月31日

Js动态创建div 代码

摘要: 这是原来的CSS样式 .item{float:left;overflow:hidden;margin-left:8px;margin-top:10px;width: 320px; height: 250px;background-repeat: no-repeat; background-image:url(../images/bgred.jpg)} .curve{position:relative;width:320px; height:250px; z-index:1; left: 75px; top: -40px;} 动态创建DIV代码如下: for(j = 0;j*8 <str. 阅读全文

posted @ 2011-05-31 17:59 dawnruby 阅读(498) 评论(0) 推荐(0)

js 基础大全[手册]

摘要: 一、JS大全1.document.write(""); 输出语句2.JS中的注释为//3.传统的HTML文档顺序是:document->html->(head,body)4.一个浏览器窗口中的DOM顺序是:window->(navigator,screen,history,location,document)5.得到表单中元素的名称和值:document.getElementById("表单中元素的ID号").name(或value)6.一个小写转大写的JS: document.getElementById("output&q 阅读全文

posted @ 2011-05-31 17:58 dawnruby 阅读(1319) 评论(0) 推荐(0)

js 控制 DIV 在窗口固定位置代码

摘要: 代码:<script type=text/javascript>window.onresize = resizeDiv; window.onscroll = resizeDiv; function resizeDiv() { var docWidth = document.documentElement.clientWidth; var docHeight = document.documentElement.clientHeight; document.getElementById("branding").style.top = parseInt(docume 阅读全文

posted @ 2011-05-31 17:57 dawnruby 阅读(690) 评论(0) 推荐(0)

导航