摘要:
正则表达式中的常用模式下面是正则表达式中的一些常用模式。 /pattern/ 结果 . 匹配除换行符以外的所有字符 x? 匹配 0 次或一次 x 字符串 x* 匹配 0 次或多次 x 字符串,但匹配可能的最少次数 x+ 匹配 1 次或多次 x 字符串,但匹配可能的最少次数 .* 匹配 0 次或一次的任何字符 .+ 匹配 1 次或多次的任何字符 {m} 匹配刚好是 m 个 的指定字符串 {m,n} ... 阅读全文
摘要:
<body onkeypress=alert(event.keyCode)>请按任意键,你将得到该键的键值! keycode 0 = keycode 1 = keycode 2 = keycode 3 = keycode 4 = keycode 5 = keycode 6 = keycode 7 = keycode 8 = BackSpace BackSpace keycode 9 =... 阅读全文
摘要:
Keycode对照表 字母和数字键的键码值(keyCode) 按键 键码 按键 键码 按键 键码 按键 键码 A 65 J 74 S 83 1 49 B 66 K 75 T 84 2 50 C 67 L 76 U 85 3 51 D 68 M 77 V 86 4 52 E 69 N 78 W 87 5 53 F 70 O 79 X 88 6 54 G 71 P 80 Y 89 7 55 H 72 ... 阅读全文
摘要:
1.document.write(""); 输出语句2.JS中的注释为//3.传统的HTML文档顺序是:document->html->(head,body)4.一个浏览器窗口中的DOM顺序是:window->(navigator,screen,history,location,document)5.得到表单中元素的名称和值:document.getElementById("表单... 阅读全文
摘要:
n多的东西,自己找找吧javascript事件查询综合click() 对象.click() 使对象被点击。closed 对象.closed 对象窗口是否已关闭true/falseclearTimeout(对象) 清除已设置的setTimeout对象clearInterval(对象) 清除已设置的setInterval对象confirm(”提示信息”) 弹出确认框,确定返回t... 阅读全文
摘要:
每一项都是js中的小技巧,但十分的实用! 1.document.write(""); 输出语句 2.JS中的注释为// 3.传统的HTML文档顺序是:document->html->(head,body) 4.一个浏览器窗口中的DOM顺序是:window->(navigator,screen,history,location,document) 5.得到表单中元素的名称和值:do... 阅读全文
摘要:
事件源对象 event.srcElement.tagName event.srcElement.type 捕获释放 event.srcElement.setCapture(); event.srcElement.releaseCapture(); 事件按键 event.keyCode event.shiftKey event.altKey event.ctrlKey 事件返回值 event.ret... 阅读全文