� 统一编码/解码
alert(decodeURIComponent(encodeURIComponent("http://你好.com?as= hehe")))
encodeURIComponent 对":"、"/"、";" 和 "?"也编码
� 表格行指示
<tr onmouseover="this.bgColor=‘#f0f0f0‘" onmouseout="this.bgColor=‘#ffffff‘">
//各种尺寸
s += "\r\n 网页可见区域宽:"+ document.body.clientWidth;
s += "\r\n 网页可见区域高:"+ document.body.clientHeight;
s += "\r\n 网页可见区域高:"+ document.body.offsetWeight +" (包括边线的
宽)";
s += "\r\n 网页可见区域高:"+ document.body.offsetHeight +" (包括边线的
宽)";
s += "\r\n 网页正文全文宽:"+ document.body.scrollWidth;
s += "\r\n 网页正文全文高:"+ document.body.scrollHeight;
s += "\r\n 网页被卷去的高:"+ document.body.scrollTop;
s += "\r\n 网页被卷去的左:"+ document.body.scrollLeft;
s += "\r\n 网页正文部分上:"+ window.screenTop;
s += "\r\n 网页正文部分左:"+ window.screenLeft;
s += "\r\n 屏幕分辨率的高:"+ window.screen.height;
s += "\r\n 屏幕分辨率的宽:"+ window.screen.width;
s += "\r\n 屏幕可用工作区高度:"+ window.screen.availHeight;
s += "\r\n 屏幕可用工作区宽度:"+ window.screen.availWidth;
//过滤数字
<input type=text onkeypress="return event.keyCode>=48&&event.keyCode<=57||(t
his.value.indexOf(‘.‘)<0?event.keyCode==46:false)" onpaste="return !clipboar
dData.getData(‘text‘).match(/\D/)" ondragenter="return false">
//特殊用途
<input type=button value=导入收藏夹
onclick="window.external.ImportExportFavorites(true,‘http://localhost‘);">
<input type=button value=导出收藏夹
onclick="window.external.ImportExportFavorites(false,‘http://localhost‘);">