用js实现终止浏览器对页面HTML的继续解析即停止解析 兼容firefox

来源:互联网 发布:js删除元素节点 编辑:程序博客网 时间:2024/05/11 23:18

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>测试一下</title>
</head>
<body>
<script language="javascript">
function mystop(){
if(!!(window.attachEvent && !window.opera))
{document.execCommand("stop");}
else
{window.stop();}
}
mystop();
</script>
就是不出来。
</body>
</html>

原创粉丝点击