Fine weather Thief Code

Source: Internet
Author: User
Tags split window
Can be based on the user's IP directly show the local weather conditions within 3 days, pure static is very small, you can directly insert any Web page.

Download: Http://bbs.chinaz.com/UploadFile/2005-8/200581113211254275.rar

is actually a piece of code, save as an HTML file weather.htm can.
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">

<title> Weather Forecast </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= "Http://www.116.com.cn/116/home/weather/public.js" ></script>
<script language= "JavaScript" type= "Text/javascript" src= "Http://www.116.com.cn/116/home/weather/weather.js" ></script>
<script language= "JavaScript" type= "Text/javascript" src= "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= "border=" 0 "cellpadding=" 0 "cellspacing=" 0 ">
<tr>
&LT;TD width= "195" valign= "bottom" class= "f14b" ><table width= "100%" border= "0" cellspacing= "0" cellpadding= "0" >
<tr>
&LT;TD height= "Ten" ></td>
</tr>
<tr>
&LT;TD align= "center" class= "f14b" > Your city: <font color= "#ff6600" >
<script language= "JavaScript" >
document.write (Owea.swname);
</script></font>
</td>
</tr>
<tr>
&LT;TD height= "Ten" ></td>
</tr>
</table></td>
</tr>
<tr>
<form name= "Form1" method= "Post" action= "" >
&LT;TD width= "160" align= "center" valign= "Top" >
<table width= "190" border= "0" cellspacing= "0" cellpadding= "0" >
&LT;TR align= "center" valign= "Bottom" >
&LT;TD width= "height=" class= "F12orange" > Today </td>
&LT;TD width= class= "F2blue" > Tomorrow </td>
&LT;TD width= class= "F2blue" > The day After Tomorrow </td>
</tr>
<tr>
&LT;TD height= "Ten" ></td>
</tr>
&LT;TR align= "center" >
&LT;TD height= "><script" language= "JavaScript" >
var weather24=owea.swweather24.split ("-");
document.write (" ');
if (weather24.length==2) document.write ("</script></td>
<td><script language= "JavaScript" >
var weather48=owea.swweather48.split ("-");
document.write (" ');
if (weather48.length==2) document.write ("</script></td>
<td><script language= "JavaScript" >
var weather72=owea.swweather72.split ("-");
document.write (" ');
if (weather72.length==2) document.write ("</script></td>
</tr>
&LT;TR align= "center" >
<td><script language= "JavaScript" >
var wendu=owea.swwendu24.split ("-");
document.write ("<span class= ' f12blue2 ' >" +wendu[0]+ "</span>");
</script></td>
&LT;TD height= "><script" language= "JavaScript" >
var wendu=owea.swwendu48.split ("-");
document.write ("<span class= ' f12blue2 ' >" +wendu[0]+ "</span>");
</script></td>
&LT;TD height= "><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>
Page Call Code:
<iframe frameborder=0 width=160 height=100 marginheight=0 marginwidth=0 name=weather scrolling=no title= "Weather Forecast" src= " /weather.htm "></iframe>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.