上一页 1 ··· 7 8 9 10 11 12 下一页
摘要: match()使用正则表达式模式对字符串执行查找,并将包含查找的结果作为数组返回。stringObj.match(rgExp)stringObj必选项。对其进行查找的 String 对象或字符串文字。rgExp必选项。为包含正则表达式模式和可用标志的正则表达式对象。也可以是包含正则表达式模式和可用标志的变量名或字符串文字。其余说明与exec一样,不同的是如果match的表达式匹配了全局标记g将出现所有匹配项,而不用循环,但所有匹配中不会包含子匹配项。//stringObj.match(rgExp) //stringObj:必选项。对其进行查找的 String 对象或字符串文字。//rgExp: 阅读全文
posted @ 2013-05-29 15:20 金帛 阅读(417) 评论(0) 推荐(0) 编辑
摘要: /*让position:fixed在IE6下可用! */.fixed-top /*头部固定 */{position:fixed;bottom:auto;top:0px;}.fixed-bottom /* 底部固定 */{position:fixed;bottom:0px;top:auto;}.fixed-left /* 左侧固定 */{position:fixed;right:auto;left:0px;}.fixed-right /* 右侧固定 */{position:fixed;right:0px;left:auto;}/* 上面的是除了IE6的主流浏览器通用的方法 */* html,* 阅读全文
posted @ 2013-05-22 16:41 金帛 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 跨域就用jsonp 阅读全文
posted @ 2013-05-20 09:42 金帛 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 1. Ctrl+L 选择整行(按住-继续选择下行) 2. Ctrl+Shift+K(shhift+del) 删除整行, ctrl + KK 从光标处删之行尾,Ctrl+K Backspace 从光标处删除至行首3. Ctrl+Shift+D 复制光标所在整行,插入在该行之前 4. Ctrl+D 选词 (按住-继续选择下个相同的字符串,再按,可跳到相应的方法定义处5. Ctrl+Shift+M 选择括号内的内容(按住-继续选择父括号) 6. Ctrl+/ 注释整行(如已选择内容,同“Ctrl+Shift+/”效果)7. Ctrl... 阅读全文
posted @ 2013-05-13 23:32 金帛 阅读(413) 评论(0) 推荐(0) 编辑
摘要: offsetTop一开始以为只要容器内div的top定位为负就行,结果今天刚做了个demo,发现好像不是那么回事,于是经过各种测试,得出了一些结论,结论看demo<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> 阅读全文
posted @ 2013-05-06 22:24 金帛 阅读(219) 评论(0) 推荐(0) 编辑
摘要: text的input输入框border:none; IE6 7 下没效果<input type="text" name="" value="" style="border:none;" /><input type="text" name="" value="" style="border:0;" /> 需设定为border:0;才有用 阅读全文
posted @ 2013-05-02 15:21 金帛 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 鼠标拖拽DIV移动,鼠标拖动改变DIV的宽高<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"><head> <meta http-equiv="Content-Type" content=" 阅读全文
posted @ 2013-04-11 11:38 金帛 阅读(438) 评论(0) 推荐(0) 编辑
摘要: javascript 封装一个class选择器缺点是选择不了如<liclass="cccabc">class为cccabc<>这种含有多个class的节点<ul id="ul1"> <li>1</li> <li>2</li> <li class="ccc">class为ccc</li> <li>4</li> <li class="ccc">class为ccc</li& 阅读全文
posted @ 2013-03-27 15:58 金帛 阅读(289) 评论(0) 推荐(0) 编辑
摘要: 1、首尾子节点(有兼容问题)firstChild,firstElementChild 首子节点,前者为IE678,后者为FFlastChild,lastElementChild 尾子节点,前者为IE678,后者为FF<ul id="ul1"> <li>111</li> <li>222</li> <li>333</li> <li>444</li> <li>555</li></ul><script>var oUl = doc 阅读全文
posted @ 2013-03-27 15:42 金帛 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 1、childNodes nodeType 获取子节点(有兼容问题,用nodeType来判断)——children获取子节点(无兼容问题)<ul id="ul1"> <li>1111</li> <li>2222</li> <li>3333</li></ul><script>var oUl = document.getElementById("ul1");alert(oUl.childNodes.length); /*IE6,7,8下弹出3,其他弹出 阅读全文
posted @ 2013-03-27 15:23 金帛 阅读(160) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 下一页