| |
网页常用小技巧
|
日期:2006年10月22日 作者:
查看:[大字体 中字体
小字体]
|
</BODY></HTML>
34.脚本永不出错 <SCRIPT LANGUAGE="javascript"> <!-- Hide function killErrors() { return true; } window.onerror = killErrors; // --> </SCRIPT>
35.ENTER键可以让光标移到下一个输入框 <input onkeydown="if(event.keyCode==13)event.keyCode=9">
36. 检测某个网站的链接速度: 把如下代码加入<body>区域中: <script language=javascript> tim=1 setInterval("tim++",100) b=1
var autourl=new Array() autourl[1]="http://www.njcatv.net/";; autourl[2]="javacool.3322.net" autourl[3]="http://www.sina.com.cn/";; autourl[4]="http://www.nuaa.edu.cn/";; autourl[5]="http://www.cctv.com/";;
function butt(){ document.write("<form name=autof>") for(var i=1;i<autourl.length;i++) document.write("<input type=text name=txt"+i+" size=10 value=测试中……> =》<input type=text
name=url"+i+" size=40> =》<input type=button value=GO
onclick=window.open(this.form.url"+i+".value)><br>") document.write("<input type=submit value=刷新></form>") } butt() function auto(url){ document.forms[0]["url"+b].value=url if(tim>200) {document.forms[0]["txt"+b].value="链接超时"} else {document.forms[0]["txt"+b].value="时间"+tim/10+"秒"} b++ } function run(){for(var i=1;i<autourl.length;i++)document.write("<img
src=http://"+autourl+"/"+Math.random()+" width=1 height=1
onerror=autohttp://";;+autourl+"`)>")} run()</script>
37. 各种样式的光标 auto :标准光标 default :标准箭头 hand :手形光标 wait :等待光标 text :I形光标 vertical-text :水平I形光标 no-drop :不可拖动光标 not-allowed :无效光标 help :?帮助光标 all-scroll :三角方向标 move :移动标 crosshair :十字标 e-resize n-resize nw-resize w-resize s-resize se-resize sw-resize
38.页面进入和退出的特效 进入页面<meta http-equiv="Page-Enter" content="revealTrans(duration=x, transition=y)"> 推出页面<meta http-equiv="Page-Exit" content="revealTrans(duration=x, transition=y)">
上一篇:新手主页制作点滴心得
下一篇:学会阅读ALEXA报表
|
特别声明:本站除部分特别声明禁止转载的专稿外的其他文章可以自由转载,但请务必注明出处和原始作者。文章版权归文章原始作者所有。对于被本站转载文章的个人和网站,我们表示深深的谢意。如果本站转载的文章有版权问题请联系编辑人员,我们尽快予以更正。
[打印本页] [关闭窗口] 转载请注明来源:http://www.abcdown.net
| |