最新动态
旅游首页往日回顾
2024-10-31 10:56  浏览:99

  ');

旅游首页往日回顾

  }

  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/mobile/ , 查看更多