if (window == top)top.location.href = "frames.htm"; //frames.htm为框架网页
// --
9. 防止被人frame
<SCRIPT LANGUAGE=JAVASCRIPT<!--
if (top.location != self.location)top.location=self.location;
// --
10. 网页将不能被另存为
<noscript<iframe src="http://img.tulaoshi.com/attachment/portal"window.location = "view-source:"+ "http://www.pconline.com.cn""
12.删除时确认
<a href="javascript:if(confirm("确实要删除吗?"))location="boos.asp?&areyou=删除&page=1""删除
(本文来源于图老师网站,更多请访问http://m.tulaoshi.com)13. 取得控件的绝对位置
//Javascript
<script language="Javascript"
function 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);
}
//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
--