js通过iframe加载外部网页的实现代码
今天从别的网站看到的,不需要跳转到别的页面直接本域名下调用外部网页。里面用js控制iframe的大小,确实不错。
<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/>
<title>毛票票_www.nhooo.com</title>
<metaname="keywords"content="毛票票,毛票票_www.nhooo.com"/>
<metaname="description"content="毛票票相关信息,毛票票_www.nhooo.com"/>
<linkrel="shortcuticon"type="image/x-icon"href="./favicon.ico">
<linkhref="images/style.css"rel="stylesheet"type="text/css"/>
<scripttype="text/javascript"src="js/jquery.min.js"></script>
<scripttype="text/javascript">
window.onerror=function(){returntrue;}
$(function(){
headerH=0;varh=$(window).height();
$("#huoduan_frame").height((h-headerH)+"px");
});
</script>
<!--[ifIE6]>
<scripttype="text/javascript"src="js/DDPNG.js"></script>
<scripttype="text/javascript">
DD_belatedPNG.fix('.png');
</script><![endif]-->
</head>
<bodyscroll="no"style="margin:0;padding:0;overflow-y:hidden">
<iframeid="huoduan_frame"frameborder="0"scrolling="yes"name="main"src="https://www.nhooo.com/index.htm"style="height:500px;visibility:inherit;width:100%;z-index:1;overflow:visible;"></iframe>
<divstyle="display:none">
©<ahref="http://so.jb51.net/">好搜网</a><ahref="http://so.jb51.net/"target="_blank">最好的搜索引擎</a>以上搜索结果由<ahref="http://so.jb51.net/"target="_blank">百度</a>驱动</div>
</body></html>
毛票票小编注:里面使用了jquery。
热门推荐
10 诗词送行祝福语大全简短
11 新房开工吉日祝福语简短
12 50多岁生日简短祝福语
13 安徽疫情祝福语简短英语
14 农民朋友发财祝福语简短
15 对生活祝福语简短精辟
16 搬家词简短祝福语朋友
17 女神结婚快乐祝福语简短
18 文学短句祝福语大全简短