当前位置: 移动技术网 > IT编程>网页制作>CSS > 调用265天气预报,不显示链接

调用265天气预报,不显示链接

2017年12月12日  | 移动技术网IT编程  | 我要评论
1、首先做一个5*5的透明gif文件,保存在“image”文件夹

2、建一个“weather”htm文件,代码如下:

<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<title>天气预报</title>
<style type="text/css">
<!--
body {
        margin-left: 0px;
        margin-top: 0px;
        margin-right: 0px;
        margin-bottom: 0px;
}
-->
</style>
<script language="javascript" type="text/javascript">
document.oncontextmenu=new function('event.returnvalue=false;');
document.onselectstart=new function('event.returnvalue=false;');
//以上是禁止鼠标右键
<!--
function mm_reloadpage(init) {  //reloads the window if nav4 resized
  if (init==true) with (navigator) {if ((appname=="netscape")&&(parseint(appversion)==4)) {
    document.mm_pgw=innerwidth; document.mm_pgh=innerheight; onresize=mm_reloadpage; }}
  else if (innerwidth!=document.mm_pgw || innerheight!=document.mm_pgh) location.reload();
}
mm_reloadpage(true);
//-->
</script>
</head>
<body bgcolor="#fff9ee">
<div id="layer1" style="position:absolute; width:175px; height:54px; z-index:1; left: 0; top: 0;"><img src="image/weather.gif" alt="天气预报" width="190" height="54"></div>
<iframe src="http://weather.265.com/weather.htm" width="190" height="54" frameborder="0" marginwidth="0" marginheight="0" scrolling="no" name="i1"></iframe>
</body>
</html>

3、调用代码:
<iframe src="weather.htm" width="190" height="54" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>


这样就ok了。。。。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网