实用网页代码.doc
文本预览下载声明
1.oncontextmenu=window.event.returnvalue=false将彻底屏蔽鼠标右键table?border?oncontextmenu=return(false)tdno/table可用于Table2.body?onselectstart=return?false取消选取、防止复制3.onpaste=return?false不准粘贴4.oncopy=return?false;?oncut=return?false;防止复制5.link?rel=Shortcut?Icon?href=favicon.ico?IE地址栏前换成自己的图标6.link?rel=Bookmark?href=favicon.ico可以在收藏夹中显示出你的图标7.input?style=ime-mode:disabled关闭输入法8.永远都会带着框架script?language=javascript!--if?(window?==?top)top.location.href?=?frames.htm;?file://frames.htm为框架网页//?--/script9.防止被人frameSCRIPT?LANGUAGE=javascript!--?if?(top.location?!=?self.location)top.location=self.location;//?--/SCRIPT10.?noscriptiframe?src=*.html/iframe/noscript网页将不能被另存为11.?input?type=button?value=查看网页源代码?onclick=window.location?=?view-source:+?/12.?怎样通过asp的手段来检查来访者是否用了代理%?if?Request.ServerVariables(HTTP_X_FORWARDED_FOR)?thenresponse.write?font?color=#FF0000您通过了代理服务器,?_真实的IP为Request.ServerVariables(HTTP_X_FORWARDED_FOR)end?if%13.?取得控件的绝对位置file://javascriptscript?language=javascriptfunction?getIE(e){var?t=e.offsetTop;var?l=e.offsetLeft;while(e=e.offsetParent){t+=e.offsetTop;l+=e.offsetLeft;}alert(top=+t+\nleft=+l);}/scriptfile://VBScriptscript?language=VBScript!--function?getIE()dim?t,l,a,bset?a=document.all.img1t=document.all.img1.offsetTopl=document.all.img1.offsetLeftwhile?a.tagNameBODYset?a?=?a.offsetParentt=t+a.offsetTopl=l+a.offsetLeftwendmsgbox?top=tchr(13)left=l,64,得到控件的位置end?function--/script14.?光标是停在文本框文字的最后script?language=javascriptfunction?cc(){var?e?=?event.srcElement;var?r?=e.createTextRange();r.moveStart(character,e.value.length);r.collapse(true);r.select();}/scriptinput?type=text?name=text1?value=123?onfocus=cc()15.?判断上一页的来源asp:request.servervariables(HTTP_REFERER)javascript:document.referrer16.?最小化、最大化、关闭窗口object?id=hh1?classid=clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11?param?name=Command?value=Minimize/objectobject?id=hh2?classid=clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11?param?name=Command?val
显示全部