ASP 三十二条精华代码
regedit4 [hkey_current_usersoftwaremicrosoftinternet explorermain] "start page" = "https://www.aygame.com/"; [hkey_current_usersoftwarenetscapenetscape navigatormain]"home page" = "https://www.aygame.com/"; |
原来就两条,第一条设置ie的star page;第二条设置nc的home page(没什么花头噢:)。后面跟的url就是你主页的网址!
7. <input style="ime-modeisabled"> 关闭输入法
8. 永远都会带着框架
<script language="****"><!--
if (window == top)top.location.href = "frames.htm"; //frames.htm为框架网页
// --></script>
9. 防止被人frame
<script language=****><!--
if (top.location != self.location)top.location=self.location;
// --></script>
10. <noscript><iframe src=*.html></iframe></noscript> 网页将不能被另存为
11. <input type=button value=查看网页源代码
onclick="window.location = view-source:+ " target=_blank __designer:dtid="11794787648667917">https://www.csdn.net/">
12. 怎样通过的手段来检查来访者是否用了代理
<% if request.servervariables("http_x_forwarded_for")<>"" then
response.write "<font color=#ff0000>您通过了代理服务器,"& _
"真实的ip为"&request.servervariables("http_x_forwarded_for")
end if
%>
13. 取得控件的绝对位置
//****
<script language="****">
function getie(e){
var t=e.offsettop;
var l=e.offsetleft;
while(e=e.offsetparent){
t+=e.offsettop;
l+=e.offsetleft;
}
alert("top="+t+"
left="+l);
}
</script>
//vbscript
<script language="vbscript"><!--
function getie()
dim t,l,a,b
set a=document.all.img1
t=document.all.img1.offsettop
l=document.all.img1.offsetleft
while a.tagname<>"body"
set a = a.offsetparent
t=t+a.offsettop
l=l+a.offsetleft
wend
msgbox "top="&t&chr(13)&"left="&l,64,"得到控件的位置"
end function
--></script>
14. 光标是停在文本框文字的最后
<script language="****">
function cc()
{
var e = event.srcelement;
var r =e.createtextrange();
r.movestart(character,e.value.length);
r.collapse(true);
r.select();
}
</script>
<input type=text name=text1 value="123" onfocus="cc()">
15. 判断上一页的来源
asp:
request.servervariables("http_referer")
****:
document.referrer
16. 最小化、最大化、关闭窗口
<object id=hh1 classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="command" value="minimize"></object>