++++++++++++++++ weather.htm +++++++++++++++
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<style>body{font-size:9pt}</style>
<title>全国24小时早间城市天气预报</title>
<script language="vbscript">
function bytes2bstr(vin)
strreturn = ""
for i = 1 to lenb(vin)
thischarcode = ascb(midb(vin,i,1))
if thischarcode < &h80 then
strreturn = strreturn & chr(thischarcode)
else
nextcharcode = ascb(midb(vin,i+1,1))
strreturn = strreturn & chr(clng(thischarcode) * &h100 + cint(nextcharcode))
i = i + 1
end if
next
bytes2bstr = strreturn
end function
</script>
<script language="javascript">
self.onerror=null;
var isload = <html><body text=#003366><center><span style=\"font-size:9pt\">正在读取数据, 请稍候 ……</span></center></body></html>;
try{
var http = new activexobject("microsoft.xmlhttp"); //建立xmlhttp对象
}
catch(e){alert("wrong!使用本服务您必须使用ie5.0以上版本的浏览器");
}
function doit()
{if (http.readystate!=4){return;}
back=bytes2bstr(http.responsebody)
back=back.substr(back.indexof("<map name=map>"));
parent.tqif.document.open();
parent.tqif.document.writeln("<html><style>td,body{font-size:9pt}</style><body leftmargin=0 topmargin=0 >");
parent.tqif.document.writeln("<div id=overdiv style=\"z-index: 1; position: absolute\"></div>");
parent.tqif.document.writeln("<\script language=javascript1.1 src=\"tojava.js\"><\/script>");
parent.tqif.document.writeln (back);
parent.tqif.document.writeln("<img src=\"chinamapzj.gif\" width=559 usemap=\"#map\" border=0></body></html>");
parent.tqif.document.close();
delete(http);
}
function send(str,url)
{
http.open("get",url,true)
http.send()
http.onreadystatechange=doit;
return;
}
function rp2(str,fs,is)
{while (str.indexof(fs)!=-1)
str = str.replace(fs,is)
return(str)
}
function init()
{send("","http://202.106.103.44/forecast/fc06024.php");
}</script>
</head>
<body onload="init()">
<script language=javascript1.1 src="tojava.js"></script>
<img src="chinamapzj.gif" width=1 border=0>
<iframe width=560 height=560 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no bordercolor="#000000" name=tqif src="javascript:parent.isload"></iframe>
</body>
</html>
***************** tojava.js ****************
if (typeof fcolor == undefined) { var fcolor = "#ccffcc";}
if (typeof backcolor == undefined) { var backcolor = "#333399";}
if (typeof textcolor == undefined) { var textcolor = "#0000ff";}
if (typeof capcolor == undefined) { var capcolor = "#ffffff";}
if (typeof closecolor == undefined) { var closecolor = "#9999ff";}
if (typeof width == undefined) { var width = "120";}
if (typeof border == undefined) { var border = "1";}
if (typeof offsetx == undefined) { var offsetx = -120;}
if (typeof offsety == undefined) { var offsety = 10;}
var x = 0;
var y = 0;
var snow = 0;
var sw = 0;
var cnt = 0;
var dir = 1;
var tr=1;
if (top.location!= location){
over = overdiv.style
document.onmousemove = mousemove
}
function drawcitys(text) {
dts(1,text);
}
function mout() {
if ( cnt >= 1 ) { sw = 0 };
if ( sw == 0 ) {
snow = 0;
hideobject(over);
} else {
cnt++;
}
}
function dts(d,text) {
txt = "<table width="+width+" border=0 cellpadding="+border+" cellspacing=0 bgcolor=\""+backcolor+"\"><tr><td><table width=100% border=0 cellpadding=2 cellspacing=0 bgcolor=\""+fcolor+"\"><tr><td class=p1><font face=\"宋体\" color=\""+textcolor+"\">"+text+"</font></td></tr></table></td></tr></table>"
layerwrite(txt);
dir = d;
disp();
}
function disp() {
if (snow == 0)
{
if (dir == 2) { // center
moveto(over,x+offsetx-(width/2),y+offsety);
}
if (dir == 1) { // right
moveto(over,x+offsetx,y+offsety);
}
if (dir == 0) { // left
moveto(over,x-offsetx-width,y+offsety);
}
showobject(over);
snow = 1;
}
}
function mousemove(e) {
x=event.x+document.body.scrollleft;
y=event.y+document.body.scrolltop;
if (snow) {
if (dir == 2) { // center
moveto(over,x+offsetx-(width/2),y+offsety);
}
if (dir == 1) { // right
moveto(over,x+offsetx,y+offsety);
}
if (dir == 0) { // left
moveto(over,x-offsetx-width,y+offsety);
}
}
}
function cclick() {
hideobject(over);
sw=0;
}
function layerwrite(txt) {
document.all["overdiv"].innerhtml = txt
}
function showobject(obj) {
obj.visibility = "visible"
}
function hideobject(obj) {
obj.visibility = "hidden"
}
function moveto(obj,xl,yl) {
obj.left = xl
obj.top = yl
}
=====================chinamapzj.gif=====================

***************使用说明******************************
将以上三个文件保存到一个目录中,打开weather.htm就可以看到最新的天气预报了.
