/*
天气预报
需要 JQUERY 库支持,未引用的 请引用 http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
代码修改自:tabyouto.com 博客宠物 代码
*/
var WeatherCity = "广州  ";
var WeatherToday = "晴  8℃~19℃";
var WeatherTomorrow = "晴  10℃~19℃";
var WeatherUrl = "city/guangzhou.html";
jQuery(document).ready(function($){var msgs=["<a href=\"http://t.xidie.com/"+WeatherUrl+"\" title=\""+WeatherCity+"\u672a\u6765\u4e09\u5929\u5929\u6c14\u8be6\u60c5\" target=\"_blank\">\u5929\u6c14\u64ad\u62a5\uff1a<br/>"+WeatherCity+" "+WeatherToday+"</a>","<a href=\"http://t.xidie.com/"+WeatherUrl+"\" title=\""+WeatherCity+"\u5929\u6c14\u8be6\u60c5\" target=\"_blank\">"+WeatherCity+" \u660e\u65e5\u5929\u6c14<br/> "+WeatherTomorrow+"</a>"];var style="<style id=\"XidieWeather\"type=\"text/css\">#WeatherPet{display:block;width:150px;height:190px;position:absolute;top:-200px;left:160px;z-index:9999}\
#PetMsg{color:#191919;border:1px solid#c4c4c4;background:#ddd;-moz-border-radius:5px;-webkit-border-radius:5px;border-radius:5px;min-height:1em;padding:5px;top:-30px;position:absolute;text-align:center;width:auto!important;z-index:10000;-moz-box-shadow:0 0 15px#eeeeee;-webkit-box-shadow:0 0 15px#eeeeee;border-color:#eeeeee;box-shadow:0 0 15px#eeeeee;outline:none;font-size:12px}\
#PetMsg a{color:#191919;text-decoration:none}\
#PetMsg a:hover{color:#00C}\
#PetBody{width:150px;height:190px;cursor:move;background-image:url(http://t.xidie.com/skin/img/WeatherPet.png);background-repeat: no-repeat;}</style>";
$("body").prepend(style+"<div id=\"WeatherPet\"><div id=\"PetMsg\"></div><div id=\"PetBody\"></div></div>");function showMessage(a,b){if(b==null)b=10000;$("#PetMsg").hide().stop().html(a).fadeIn().fadeTo("1",1).fadeOut(b)};var now=(new Date()).getHours();if(now>0&&now<=6){msgs.push("\u4f60\u662f\u591c\u732b\u5b50\u5440\uff1f\u8fd8\u4e0d\u7761\u89c9\uff0c\u660e\u5929\u8d77\u7684\u6765\u4e48\u4f60\uff1f")}else if(now>6&&now<=11){msgs.push('\u65e9\u4e0a\u597d\uff0c\u65e9\u8d77\u7684\u9e1f\u513f\u6709\u866b\u5403\u5662\uff01\u65e9\u8d77\u7684\u866b\u513f\u88ab\u9e1f\u5403\uff0c\u4f60\u662f\u9e1f\u513f\u8fd8\u662f\u866b\u513f\uff1f\u563b\u563b\uff01')}else if(now>11&&now<=14){msgs.push('\u4e2d\u5348\u4e86\uff0c\u5403\u996d\u4e86\u4e48\uff1f\u4e0d\u8981\u997f\u7740\u4e86\uff0c\u997f\u6b7b\u4e86\u8c01\u6765\u633a\u6211\u5440\uff01')}else if(now>14&&now<=18){msgs.push('\u4e2d\u5348\u7684\u65f6\u5149\u771f\u96be\u71ac\uff01\u8fd8\u597d\u6709\u4f60\u5728\uff01')}else{msgs.push('\u5feb\u6765\u9017\u6211\u73a9\u5427\uff01')};showMessage(msgs[Math.floor(Math.random()*msgs.length)],10000);$("#WeatherPet").animate({top:$("#WeatherPet").offset().top+300,left:document.body.offsetWidth-160},{queue:false,duration:1000});window.setInterval(function(){msgs=["<a href=\"http://t.xidie.com/"+WeatherUrl+"\" title=\""+WeatherCity+" \u672a\u6765\u4e09\u5929\u5929\u6c14\u8be6\u60c5\" target=\"_blank\">\u5929\u6c14\u64ad\u62a5\uff1a<br/>"+WeatherCity+"&nbsp;&nbsp;"+WeatherToday+"</a>","\u966a\u6211\u804a\u5929\u5427\uff01","\u597d\u65e0\u804a\u54e6\uff0c\u4f60\u90fd\u4e0d\u966a\u6211\u73a9\uff01","\u2026@\u2026\u2026!\u2026\u2026\u2026","\u6211\u53ef\u7231\u5427\uff01\u563b\u563b!~^_^!~~","\u8c01\u6deb\u8361\u5440?~\u8c01\u6deb\u8361?\uff0c\u4f60\u6deb\u8361\u5440!~~\u4f60\u6deb\u8361\uff01~~","\u4ece\u524d\u6709\u5ea7\u5c71\uff0c\u5c71\u4e0a\u6709\u5ea7\u5e99\uff0c\u5e99\u91cc\u6709\u4e2a\u8001\u548c\u5c1a\u7ed9\u5c0f\u548c\u5c1a\u8bb2\u6545\u4e8b\uff0c\u8bb2\uff1a\u201c\u4ece\u524d\u6709\u5ea7\u2026\u2026\u201d"];var i=Math.floor(Math.random()*msgs.length);showMessage(msgs[i],10000)},35000);window.setInterval(function(){msgs=["<a href=\"http://t.xidie.com/"+WeatherUrl+"\" title=\""+WeatherCity+" \u672a\u6765\u4e09\u5929\u5929\u6c14\u8be6\u60c5\" target=\"_blank\">"+WeatherCity+" \u660e\u65e5\u5929\u6c14<br/> "+WeatherTomorrow+"</a>","\u4e7e\u5764\u5927\u632a\u79fb\uff01","\u6211\u98d8\u8fc7\u6765\u4e86\uff01~","\u6211\u98d8\u8fc7\u53bb\u4e86","\u6211\u5f97\u610f\u5730\u98d8\uff01~\u98d8\uff01~"];var i=Math.floor(Math.random()*msgs.length);s=[0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.75,-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.75];var i1=Math.floor(Math.random()*s.length);var i2=Math.floor(Math.random()*s.length);$("#WeatherPet").animate({left:document.body.offsetWidth/2*(1+s[i1]),top:document.body.offsetheight/2*(1+s[i1])},{duration:2000,complete:showMessage(msgs[i])})},45000);$(window).scroll(function(){$("#WeatherPet").animate({top:$(window).scrollTop()+300},{queue:false,duration:1000})});var stat_click=0;$("#PetBody").click(function(){if(!isPetmove){stat_click++;if(stat_click>4){msgs=["\u4f60\u6709\u5b8c\u6ca1\u5b8c\u5440\uff1f","\u4f60\u5df2\u7ecf\u6478\u6211"+stat_click+"\u6b21\u4e86","\u975e\u793c\u5440\uff01\u6551\u547d\uff01OH\uff0cMy ladygaga"];var i=Math.floor(Math.random()*msgs.length)}else{msgs=["\u7b4b\u6597\u4e91\uff01~\u6211\u98de\uff01","\u6211\u8dd1\u5440\u8dd1\u5440\u8dd1\uff01~~","\u522b\u6478\u6211\uff0c\u5927\u7537\u4eba\uff0c\u6709\u4ec0\u4e48\u597d\u6478\u7684\uff01","\u60f9\u4e0d\u8d77\u4f60\uff0c\u6211\u8fd8\u8eb2\u4e0d\u8d77\u4f60\u4e48\uff1f","\u4e0d\u8981\u6478\u6211\u4e86\uff0c\u6211\u4f1a\u544a\u8bc9\u8001\u5a46\u6765\u6253\u4f60\u7684\uff01","\u5e72\u561b\u52a8\u6211\u5440\uff01\u5c0f\u5fc3\u6211\u54ac\u4f60\uff01"];var i=Math.floor(Math.random()*msgs.length)}s=[0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.75,-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.75];var i1=Math.floor(Math.random()*s.length);var i2=Math.floor(Math.random()*s.length);$("#WeatherPet").animate({left:document.body.offsetWidth/2*(1+s[i1]),top:document.body.offsetheight/2*(1+s[i1])},{duration:500,complete:showMessage(msgs[i])})}else{isPetmove=false}});$("#PetBody").mouseover(function(){$("#PetBody").fadeTo("300",0.3);msgs=["\u6211\u9690\u8eab\u4e86\uff0c\u4f60\u770b\u4e0d\u5230\u6211","\u6211\u4f1a\u9690\u8eab\u54e6\uff01\u563f\u563f\uff01","\u522b\u52a8\u624b\u52a8\u811a\u7684\uff0c\u628a\u624b\u62ff\u5f00\uff01","\u628a\u624b\u62ff\u5f00\u6211\u624d\u51fa\u6765\uff01","\u53f3\u952e\u4e3a\u4f60\u64ad\u62a5\u5929\u6c14\u54e6\uff01"];var i=Math.floor(Math.random()*msgs.length);showMessage(msgs[i])});$("#PetBody").

Next
Pg.: 1 2 3


Back to home | File page

Subscribe | Register | Login | N