繁体中文
设为首页
加入收藏
当前位置:ASP技术首页 >> ASP应用 >> 一个天气预报的小偷

一个天气预报的小偷

2004-10-01 08:26:10  作者:  来源:互联网  浏览次数:94  文字大小:【】【】【
简介:++++++++++++++++ weather.htm +++++++++++++++ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <META HTTP-EQUIV="Pra...

++++++++++++++++ weather.htm +++++++++++++++

全国24小时早间城市天气预报

***************** 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 = "
"+text+"
"

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就可以看到最新的天气预报了.

责任编辑:admin
相关文章