<script language="javascript" defer="defer">
function doload()
{
window.close();
opener.location.href = "cgsgl.aspx";
}
<%if(Request.Cookies["CGS_QQ_ID"]!=null) {%>
setTimeout("doload()",4000);
<%} %>
</script>
2、自动省略
1、文本自动省略
<script type="text/javascript">
function check(node){
var str = node.firstChild.nodeValue;
if(str.length>10){
node.firstChild.nodeValue = str.substring(0,10) + "...";
}
}
</script>
2、屏蔽网页错误
<script type="text/javascript">
window.onerror=function(){return true;}
</script>
原文:http://www.cnblogs.com/301304Cloud/p/3748187.html