手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >js通过iframe加载外部网页的实现代码
js通过iframe加载外部网页的实现代码
摘要:今天从别的网站看到的,不需要跳转到别的页面直接本域名下调用外部网页。里面用js控制iframe的大小,确实不错。查字典教程网_www.jb5...

今天从别的网站看到的,不需要跳转到别的页面直接本域名下调用外部网页。里面用js控制iframe的大小,确实不错。

<!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"> <iframe id="huoduan_frame" frameborder="0" scrolling="yes" name="main" src="http://www.jb51.net/index.htm"></iframe> <div> © <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>

查字典教程网小编注: 里面使用了jquery。

【js通过iframe加载外部网页的实现代码】相关文章:

javascript使用Promise对象实现异步编程

JavaScript实现身份证验证代码

图片加载进度实时显示

JS通过Cookie判断页面是否为首次打开

让iframe框架网页在任何浏览器下自动伸缩

javascript瀑布流式图片懒加载实例

IE中直接运行显示当前网页中的图片 推荐

EasyUI闪屏EasyUI页面加载提示(原理+代码+效果图)

强制设为首页代码

js实现异步循环实现代码

精品推荐
分类导航