推广 热搜:     参数  行业  机械  教师  设备  系统  企业  公司 

旅游首页往日回顾

   日期:2024-10-31     浏览:99    移动:http://sicmodule.glev.cn/mobile/quote/7705.html

  ');

旅游首页往日回顾

  }

  weather.changeWeatherCity = function (val){

  if (val == "" || val == "全部城市"){

  alert("请您选择城市!");

  document.getElementById('weatherCity').focus();

  return false;

  }else{

  weather.city = val;

  weather.city_ok = weather.city.replace(/市/g,"");

  var _doc = document.getElementsByTagName('head')[0];

  var js = document.createElement('script');

  js.setAttribute('type', 'text/javascript');

  js.setAttribute('src', 'http://php.weather.sina.com.cn/js.php?city='+weather.city_ok);

  _doc.appendChild(js);

  if (navigator.userAgent.toLowerCase().indexOf("msie") != -1){//IE6、IE7

  js.onreadystatechange = function () {

  if (js.readyState == 'loaded' || js.readyState == 'complete') {

  weather.writeWeatherReport();

  weather.setWeatherCityTocookie('weatherCity', weather.city, 365);

  jQuery('.wthpop').hide();

  }

  }

  }else{//Is Firefox2、Firefox3、Safari3.1+、Opera9.6+

  js.onload = function () {

  weather.writeWeatherReport();

  weather.setWeatherCityTocookie('weatherCity', weather.city, 365);

  jQuery('.wthpop').hide();

  }

  }

  }

  }

  weather.setWeatherCityTocookie = function (name, value, days){

  if (days) {

  var date = new Date();

  date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));

  var expires = "; expires=" + date.toGMTString();

  }else{

  expires = "";

  }

  document.cookie = name + "=" + encodeURI(value) + expires + "; path=/";

  }

  weather.getWeatherCityFromcookie = function (name){

  //alert(document.cookie);

  var nameEQ = name + "=";

  var ca = document.cookie.split(';');

  for (var i=0; i

  var c = ca[i];

  while (c.charAt(0) == ' ')

  c = c.substring(1, c.length);

  if (c.indexOf(nameEQ) == 0)

  return decodeURI(c.substring(nameEQ.length, c.length));

  }

  return false;

  }

  weather.city = weather.getWeatherCityFromcookie('weatherCity');

  weather.getCityWeather();

本文地址:http://sicmodule.glev.cn/quote/7705.html    歌乐夫 http://sicmodule.glev.cn/ , 查看更多

特别提示:本信息由相关企业自行提供,真实性未证实,仅供参考。请谨慎采用,风险自负。


相关行业动态
推荐行业动态
点击排行
网站首页  |  关于我们  |  联系方式  |  使用协议  |  版权隐私  |  网站地图  |  排名推广  |  广告服务  |  积分换礼  |  网站留言  |  RSS订阅  |  违规举报  |  鄂ICP备2023001713号