上一页 1 ··· 8 9 10 11 12
摘要: 1、创建DOM元素creatElement(标签名) 创建一个节点appendChild(标签名) 追加一个节点<input type="text" name="" id="txt1" /><input type="button" value="创建li" id="btn1" /><ul id="ul1"> </ul><script>var oUl = document.getElementByI 阅读全文
posted @ 2013-03-27 14:55 金帛 阅读(533) 评论(0) 推荐(0) 编辑
摘要: 下表顺序为从上到下,从左到右:========================display || visibilitylist-style : list-style-type || list-style-position || list-style-imagepositiontop || right || bottom || leftz-indexclearfloatwidthmax-width || min-widthheightmax-height || min-heightoverflow || clipmargin : margin-top || margin-right || ma 阅读全文
posted @ 2013-03-25 10:44 金帛 阅读(330) 评论(0) 推荐(0) 编辑
摘要: 1、转换函数:parseInt(string,radix),parseFloat(string);parseInt()解析一个字符串,并返回一个整数;parseFloat()解析一个字符串,并返回一个浮点数。string:必须,要被解析的字符radix:可选,表示要解析的数字的基数。该值介于 2 ~ 36 之间。如果省略该参数或其值为 0,则数字将以 10 为基础来解析。如果它以 “0x” 或 “0X” 开头,将以 16 为基数。如果该参数小于 2 或者大于 36,则 parseInt() 将返回 NaN。parseInt("10"); //返回 10parseInt(&q 阅读全文
posted @ 2013-03-21 09:47 金帛 阅读(229) 评论(0) 推荐(0) 编辑
摘要: Break 语句for (i=0;i<=10;i++){ if (i==3) break; document.write(i); //输出012}Continue 语句for (i=0;i<=10;i++) { if (i==3) continue; document.write(i);//输出01245678910 } 阅读全文
posted @ 2013-03-20 14:33 金帛 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 转载自:http://www.cnblogs.com/java-my-life/archive/2012/08/06/2625065.html数据类型 JavaScript中有5种简单数据类型(也称为基本数据类型):Undefined、Null、Boolean、Number和String。还有1种复杂数据类型——Object,Object本质上是由一组无序的名值对组成的。 typeof操作符 介于JavaScript是松散类型的,因此需要有一种手段来检测给定变量的数据类型——typeof就是负责提供者方面信息的操作符。对一个值使用typeof操作符可能返回下列某个字符串: ●"und 阅读全文
posted @ 2013-03-20 11:13 金帛 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 禁止复制<!DOCTYPE html><html><head> <metacharset="UTF-8" /> <title></title></head><body> 复制我啊 <br /> 复制我啊 <br /> 复制我啊 <br /> 复制我啊 <br /> 复制我啊 <br /> 复制我啊 <br /> 复制我啊 <br /> 复制我啊 <br /> 复制我啊 <br / 阅读全文
posted @ 2013-03-18 14:56 金帛 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 浏览器禁止选中模拟滚动条时可以用<!DOCTYPE html><html><head> <meta charset=“UTF-8" /> <title></title></head><style type="text/css">.chromeOnselectstart{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-o-user-select:none;user-select 阅读全文
posted @ 2013-03-18 14:48 金帛 阅读(254) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12