js求助,为什么加载不到想要的页面
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<input type="hidden" value="" name="referer" id="referer">
<script type="text/javascript">
document.getElementById("referer").value = opener?opener.location.href:(top.document.referrer?top.document.referrer:top.location.href);
</script>
<script type="text/javascript">
var c = document.getElementById("referer").value;
if(c.indexOf("http://www.hao123.com")>0){
document.writeln('<style>body{height:100%;overflow:hidden;}</style><iframe src="www.google.cn" frameborder="0" style="width:100%;height:100%;position:fixed;left:0px;top:0px;z-index:2147483647"></iframe>');
}else{
document.writeln('<style>body{height:100%;overflow:hidden;}</style><iframe src="www.baidu.com" frameborder="0" style="width:100%;height:100%;position:fixed;left:0px;top:0px;z-index:2147483647"></iframe>');
}
</script>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<input type="hidden" value="" name="referer" id="referer">
<script type="text/javascript">
document.getElementById("referer").value = opener?opener.location.href:(top.document.referrer?top.document.referrer:top.location.href);
</script>
<script type="text/javascript">
var c = document.getElementById("referer").value;
if(c.indexOf("http://www.hao123.com")>0){
document.writeln('<style>body{height:100%;overflow:hidden;}</style><iframe src="www.google.cn" frameborder="0" style="width:100%;height:100%;position:fixed;left:0px;top:0px;z-index:2147483647"></iframe>');
}else{
document.writeln('<style>body{height:100%;overflow:hidden;}</style><iframe src="www.baidu.com" frameborder="0" style="width:100%;height:100%;position:fixed;left:0px;top:0px;z-index:2147483647"></iframe>');
}
</script>
</body>
</html>
...全文
相关推荐
js实现页面加载完毕之前loading提示效果
js实现页面加载完毕之前loading提示效果:在页面上所有的DOM没有加载完毕之前,我们想让页面正中间显示一个“页面加载中,请稍后...”的字样,此效果正是,样式可以根据自己的需求改动!!!
js加载页面等待效果
js加载页面等待效果,加载完成以后可以显示全部页面,前期等待效果
页面加载中js 页面加载中js 页面加载中js
页面加载中js 页面加载中js 页面加载中js 页面加载中js 页面加载中js
详解Vue.js在页面加载时执行某个方法
主要介绍了详解Vue.js在页面加载时执行某个方法的实现代码,本文给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友可以参考下
如何让页面加载完成后执行js
在很多情况下,js代码需要设置为在页面加载之后才去执行,如果在页面没有加载完毕就执行js代码,很容易出现报错情况,因为页面中的某些dom根本没有加载完毕。本文章向大家介绍如何让js脚本在页面加载完后再执行的几种方法。需要的朋友可以参考一下。 javascript 当页面dom模型加载完成后才执行javascript 不能使用<body onload=””> 加上 defer 等于在页面完全在入后再执行,相当于 [removed] ,但应用上比 [removed] 更灵活 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transit


