|
27.ENTER鍵可以讓光標(biāo)移到下一個(gè)輸入框 <input onkeydown="if(event.keyCode==13)event.keyCode=9"> 28. 檢測(cè)某個(gè)網(wǎng)站的鏈接速度: 把如下代碼加入<body>區(qū)域中: <script language=javascript> tim=1 setInterval("tim++",100) b=1 var autourl=new Array() autourl[1]="www.njcatv.net" autourl[2]="javacool.3322.net" autourl[3]="www.sina.com.cn" autourl[4]="www.nuaa.edu.cn" autourl[5]="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=測(cè)試中……> =》<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="鏈接超時(shí)"} else {document.forms[0]["txt"+b].value="時(shí)間"+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=auto('http://";;+autourl+"')>")} run()</script> 29. 各種樣式的光標(biāo) auto :標(biāo)準(zhǔn)光標(biāo) default :標(biāo)準(zhǔn)箭頭 hand :手形光標(biāo) wait :等待光標(biāo) text :I形光標(biāo) vertical-text :水平I形光標(biāo) no-drop :不可拖動(dòng)光標(biāo) not-allowed :無效光標(biāo) help :?幫助光標(biāo) all-scroll :三角方向標(biāo) move :移動(dòng)標(biāo) crosshair :十字標(biāo) e-resize n-resize nw-resize w-resize s-resize se-resize sw-resize 本新聞共 3頁(yè),當(dāng)前在第 3頁(yè) 1 2 3 |
|
【收藏】【打印】【進(jìn)入論壇】 |
|
|
|
|
|
|
|