HTML中Select不用Disabled实现ReadOnly的效果
方法如下: 实现代码如下:1
方法如下: 实现代码如下:1
网上搜来的,看样子不错,记一笔。//------------------------------------ // heavily based on the Quirksmode addEvent contest winner, John Resig // addEvent function add
慢慢来,这次实现了向任意方向扩展! 实现代码如下:Untitled Documentfunction $(pId){return document.getElementById(pId);}function JPos(){}JPos.getAbsPos = function(pTarget){var
单行一列 以下是引用片段: body { margin: 0px; padding: 0px; text-align: center; }#content { margin-left:auto; margin-right:auto; width: 400px; width: 370px; }两行一列
INPUT { LINE-HEIGHT: 20px; HEIGHT: 20px }function hh(){ { www=dd.value; rrr=open('','特效运行结果',''); rrr.document.open(); rrr.document.write(www); rrr.do
1.document.formName.item("itemName") 问题 说 明:IE下,可以使用document.formName.item("itemName")或document.formName.elements ["elementName"];Firefox下,只能使用documen
示例: *[lang=fr] { font-size:14px; width:120px; }*.div { text-decoration:none; }2.类型选择符 语法: E { sRules }说明: 类型选择符。以文档语言对象(Element)类型作为选择符。 示例: td { font
匹配中文字符的正则表达式: [\u4e00-\u9fa5] 匹配双字节字符(包括汉字在内):[^\x00-\xff] 实现代码如下:function isChinese(temp){var re = /[^\u4e00-\u9fa5]/;if(re.test(temp)) return false;
第一种:使用this关键字 function Class1() {this.onclick = function(e){for (var i=0; i < 1000; i++){var a = new Date();}}}使用this.的方法可以很灵活地给对象添加属性和方法,而且和大部分的OO
用空标签清除 .clr {clear: both;} LeftRight 使用 overflow 属性 #layout {overflow:auto; zoom:1;} LeftRight 使用 :after (非 IE 浏览器) #layout:after{display: block;clear