資源描述:
《58項---經(jīng)典js代碼收藏》由會員上傳分享,免費在線閱讀,更多相關(guān)內(nèi)容在行業(yè)資料-天天文庫。
1、58項---經(jīng)典的JS代碼收藏1.oncontextmenu="=false"將徹底屏蔽鼠標(biāo)右鍵<tableborderoncontextmenu=return(false)><td>no</table>可用于Table2.<bodyonselectstart="returnfalse">取消選取、防止復(fù)制3.onpaste="returnfalse"不準(zhǔn)粘貼4.oncopy="returnfalse;"oncut="returnfalse;"防止復(fù)
2、制5.<linkrel="ShortcutIcon"href="">IE地址欄前換成自己的圖標(biāo)6.<linkrel="Bookmark"href="">可以在收藏夾中顯示出你的圖標(biāo)7.<inputstyle="ime-mode:disabled">關(guān)閉輸入法8.永遠都會帶著框架<scriptlanguage="javascript"><!--if(window==top)="";//為框架網(wǎng)頁//--></script>9.防
3、止被人frame<SCRIPTLANGUAGE=javascript><!--if(!=)=;//--></SCRIPT>10.<noscript><iframesrc=*.html></iframe></noscript>網(wǎng)頁將不能被另存為11.<inputtype=buttonvalue=查看網(wǎng)頁源代碼onclick="=view-source:+/'">12.怎樣通過asp的手段來檢查來訪者是否用
4、了代理<%if("HTTP_X_FORWARDED_FOR")<>""then"<fontcolor=#FF0000>您通過了代理服務(wù)器,"&_"真實的IP為"&("HTTP_X_FORWARDED_FOR")endif%>13.取得控件的絕對位置//javascript<scriptlanguage="javascript">functiongetIE(e){vart=;varl=;while(e=){t+=;l+=;}alert(
5、"top="+t+"left="+l);}</script>//VBScript<scriptlanguage="VBScript"><!--functiongetIE()dimt,l,a,bseta=t=l=while<>"BODY"seta=t=t+l=l+wendmsgbox"top="&t&chr(13)&"left="&l,64,"得到控件的位置"endfunction--></script>
6、14.光標(biāo)是停在文本框文字的最后<scriptlanguage="javascript">functioncc(){vare=;varr=();(character,);(true);();}</script><inputtype=textname=text1value="123"onfocus="cc()">15.判斷上一頁的來源asp:("HTTP_REFERER")javascript:16.最小化、最大化、關(guān)閉窗口<objectid=hh1clas
7、sid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11"><paramname="Command"value="Minimize"></object><objectid=hh2classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11"><paramname="Command"value="Maximize"></object><OBJECTi
8、d=hh3classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"><PARAMNAME="Command"value="Close"></OBJECT><inputtype=buttonvalue=最小化onclick=()><inputtype=buttonvalue=最大化onclick=()><inputtype=buttonvalue=關(guān)閉onclick=()>