Home > Web Front-end > JS Tutorial > js implementation code for loading external web pages through iframe_javascript skills

js implementation code for loading external web pages through iframe_javascript skills

WBOY
Release: 2016-05-16 16:05:48
Original
1467 people have browsed it

As I saw from other websites today, there is no need to jump to other pages to directly call external web pages under this domain name. It uses js to control the size of the iframe, which is really good.

<!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=utf-8" />
<title>脚本之家_www.jb51.net</title>
<meta name="keywords" content="脚本之家,脚本之家_www.jb51.net" />
<meta name="description" content="脚本之家相关信息,脚本之家_www.jb51.net" />
<link rel="shortcut icon" type="image/x-icon" href="./favicon.ico">
<link href="images/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript"> 
window.onerror=function(){return true;} 
$(function() { 
headerH = 0;  var h = $(window).height();
  $("#huoduan_frame").height((h-headerH)+"px"); 
});
</script>
<!--[if IE 6]>
<script type="text/javascript" src="js/DDPNG.js"></script>
<script type="text/javascript">
DD_belatedPNG.fix('.png');
</script><![endif]-->
</head>
<body scroll="no" style="margin:0; padding:0; overflow-y:hidden ">
<iframe id="huoduan_frame" frameborder="0" scrolling="yes" name="main" src="http://www.jb51.net/index.htm" style=" height:500px; visibility: inherit; width: 100%; z-index: 1;overflow: visible;"></iframe>
<div style="display:none">
&copy; <a href="http://so.jb51.net/">好搜网</a> <a href="http://so.jb51.net/" target="_blank">最好的搜索引擎</a> 以上搜索结果由<a href="http://so.jb51.net/" target="_blank">百度</a>驱动 </div>
</body></html>
Copy after login

Note from the editor of Script House: jquery is used in it.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template