本站内容搜索:
   您的位置:素材中国>>教程 >>网页设计 >>网页特效 >>精美的天气小偷代码 提交错误报告
精美的天气小偷代码
[ 来源:素材中国 | 作者:| 时间:2006-08-11 23:47:05 | 浏览:人次 ]

 
 

可以根据用户的IP直接显示当地3天内的天气情况,纯静态非常小巧,可以直接插入任何网页.

下载: http://bbs.chinaz.com/UploadFile/2005-8/200581113211254275.rar

其实就是一段代码,保存为HTML文件weather.htm即可。

<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<title>天气预报</title>
<style type="text/css">
<!--
{
        margin: 0px;
}
.f14b {
        font-size: 12px;
        font-weight: bold;
        color: #333333;
}
.f12orange {
        font-size: 12px;
        color: #ff6600;
}
.f2blue {
        font-size: 12px;
        color: #333333;
}
.f12blue2 {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        color: #0066cc;
}
.f12red {
        font-size: 12px;
        color: #ff6600;
        font-family: Arial, Helvetica, sans-serif;
}
.f2black {
        font-size: 12px;
        color: #000000;
}
-->
</style>
<script language="JavaScript" type="text/JavaScript">
<!--
var openW;

function openWindow(theURL,winName,features) { //v2.0
//openW=window.open(theURL,winName,features);
//var mxh2 = window.open("about:blank","window_mxh")
//var mxh2 =window.open(theURL,winName,features);
window.showModalDialog(theURL,test(),'dialogHeight:270px;dialogWidth:265px;scroll:no;status:no')
}
function test(){
location.href="index.htm";

}
//-->
</script>

<script language="javascript" id="objscript"></script>
<script language="JavaScript" type="text/JavaScript" src="/article_pic/img/10/12558.js">http://www.116.com.cn/116/home/weather/public.js"></script>
<script language="JavaScript" type="text/JavaScript" src="/article_pic/img/10/12559.js">http://www.116.com.cn/116/home/weather/weather.js"></script>
<script language="JavaScript" type="text/JavaScript" src="/article_pic/img/10/12560.jsp">http://jsp.116.com.cn/notice/iptocityid.jsp"></script>
<script language="JavaScript">


        var locid;
        var cityname;
        var defid;
       
        if(getCookie("defid")=='')
        {
                locid=CityID;
               
               
                setCookie("defid",CityID);
                  
        }else
        {
                locid=getCookie("defid");
               
     }
         var havecheck;
        if(getCookie("check")==''){
         havecheck='2';
         }else{
         havecheck=getCookie("check");
         }
         var show;
        if(havecheck=='0'){
         locid=getCookie("CityID");
        
         show=0;
         }else {
         locid=getCookie("defid");
        
         show=1;
         }
       
        var        urlstr = "http://jsp.116.com.cn/weather/"+locid+".js";
       
        document.all["objscript"].src = urlstr;
        //var oWea = new makeWeatherObj();
        
</script>

<body topmargin="0" leftmargin="0">
<SCRIPT language="javascript">
var oWea = new makeWeatherObj();
</script>
<div align="center">
<table width="195" height="85" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="195" valign="bottom" class="f14b"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="10"></td>
      </tr>
         <tr>
        <td align="center" class="f14b">您所在的城市:<font color="#ff6600">
          <SCRIPT language="javascript">
                    document.write(oWea.swName);
                  </script></font>
                </td>
      </tr>
      <tr>
        <td height="10"></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <form name="form1" method="post" action="">
          <td width="160" align="center" valign="top">
<table width="190" border="0" cellspacing="0" cellpadding="0">
        <tr align="center" valign="bottom">
          <td width="60" height="15" class="f12orange">今天</td>
          <td width="60" class="f2blue">明天</td>
          <td width="60" class="f2blue">后天</td>
        </tr>
        <tr>
        <td height="10"></td>
      </tr>
        <tr align="center">
          <td height="25"><SCRIPT language="javascript">
                                var weather24=oWea.swWeather24.split("-");
                                document.write("<img src=http://www.116.com.cn/116/home/weather/images/icons/"+transTab(weather24[0])+"_small.gif border='0'>");
                                if(weather24.length==2) document.write("<img src=http://www.116.com.cn/116/home/weather/images/icons/"+transTab(weather24[1])+"_small.gif border='0'>");
                                </script></td>
          <td><SCRIPT language="javascript">
                                var weather48=oWea.swWeather48.split("-");
                                document.write("<img src=http://www.116.com.cn/116/home/weather/images/icons/"+transTab(weather48[0])+"_small.gif border='0'>");
                                if(weather48.length==2) document.write("<img src=http://www.116.com.cn/116/home/weather/images/icons/"+transTab(weather48[1])+"_small.gif border='0'>");
                                </script></td>
          <td><SCRIPT language="javascript">
                                var weather72=oWea.swWeather72.split("-");
                                document.write("<img src=http://www.116.com.cn/116/home/weather/images/icons/"+transTab(weather72[0])+"_small.gif border='0'>");
                                if(weather72.length==2) document.write("<img src=http://www.116.com.cn/116/home/weather/images/icons/"+transTab(weather72[1])+"_small.gif  border='0'>");
                                </script></td>
        </tr>
        <tr align="center">
          <td><SCRIPT language="javascript">
                                     var wendu=oWea.swWendu24.split("-");
                                   document.write("<span class='f12blue2'>"+wendu[0]+"</span>");
            </script></td>
          <td height="20"><SCRIPT language="javascript">
                                     var wendu=oWea.swWendu48.split("-");
                                   document.write("<span class='f12blue2'>"+wendu[0]+"</span>");
            </script></td>
          <td height="20"><SCRIPT language="javascript">
                                     var wendu=oWea.swWendu72.split("-");
                                   document.write("<span class='f12blue2'>"+wendu[0]+"</span>");
            </script>
          </td>
        </tr>
      </table></td>
        </form>
  </tr>
</table></div>

页面调用代码:
<iframe frameborder=0 width=160 height=100 marginheight=0 marginwidth=0 name=weather scrolling=no title="天气预报" src="/article_pic/img/10/12561.htm"></iframe>

 
 
       
   您的位置:素材中国>>教程 >>网页设计 >>网页特效 >>精美的天气小偷代码
 点此在百度搜索关键字"精美的天气小偷代码"  点此在GOOGLE搜索关键字"精美的天气小偷代码"
热门文章:
  ·SetTimeOut方法用法示例   ·标题栏跑马灯
  ·精美的天气小偷代码   ·连续滚动图片的制作
  ·AJAX如何处理书签和翻页按扭   ·关闭弹出窗口js代码
  ·动易首页调用最新文章图片向上滚动方法   ·JavaScript : WINDOW FOR JAVASCRIPT
  ·关于网页代码加密解密保护   ·网页高手

  首页  素材图片  高精图库  矢量图库  网页素材  网页模板  壁纸  明星  下载  教程  字体  香车美女  QQ专题  论坛

网站介绍 | 广告业务 | 设计业务 | 免责声明 | 版权声明 | 联系我们|提交错误报告
素材中国版权所有