摘要:
1.获得窗口的位置 var left = window.screenLeft || window.screenX; var top = window.screenTop || window.screenY; 2.获得窗口的大小 var width = document.documentElement 阅读全文
摘要:
1.match(pattern) 返回一个匹配正则表达式之后的数组 var text = "cat,bat,sat,fat"; var pattern = /.at/g; var matches = text.match(pattern); alert(matches);//返回包含 cat,bat 阅读全文
摘要:
1.charAt(index) 输出index位置的字符 var stringValue = "hello world"; alert(stringValue.charAt(1));//输出 e 2.charCodeAt(index) 输出index位置的字符对应的ASCII码 var string 阅读全文