$(function () { wea_foshan(); war(); /*当窗口变化大小*/ var browserheight = $(window).height(); $("#body_main").css("height", browserheight); $(window).resize(function () { var w, h if (!!(window.attachEvent && !window.opera)) { h = document.documentElement.clientHeight; w = document.documentElement.clientWidth; } else { h = window.innerHeight; w = window.innerWidth; bgscroll(h); } $("#body_main").css("height", h); }); $("#list1").dragsort({ /*拖动手柄*/dragSelector: "dl", /*启用多组列表之间拖动*/dragBetween: true, /*拖动列表的HTML部分*/placeHolderTemplate: "
  • " }); $(".da_wu2 dt:last").css("background", "none") $(".message li:last").css("background", "none") $(".da_wu li:last").css("border-bottom", "none") $(".dz_l li:last").css("border-bottom", "none") $(".qx_1 li:last").css("border-bottom", "none") /*end*/ }); //现时天气 function wea_foshan() { $.getJSON("weather/data/foshorttime.js", function (json) { if (json) { $("#wea_foshan").append("" + json[0]["tmin"] + "°C/" + json[0]["tmax"] + "°C佛山
    " + json[0]["ws"]); $("#wea_zdzd").append("" + json[0]["tmax"] + "°C相对湿度 " + json[0]["hmin"] + "%~" + json[0]["hmax"] + "%
    " + json[0]["wind"]); } }) } //预警 function war() { var sContent01 = new Array(); var sContent02 = new Array(); $.getJSON("/weather/data/wa_fo_inforce.js", function (json) { if (json) { $.each(json, function (key, value) { if (key < 3) { if (value["station_code"] == "GDSS") { sContent01.push("三水 " + value["name"] + "
    "); sContent02.push("
    "); } else if (value["station_code"] == "GDNH") { sContent01.push("南海 " + value["name"] + "
    "); sContent02.push("
    "); } else if (value["station_code"] == "BFFO") { sContent01.push("禅城 " + value["name"] + "
    "); sContent02.push("
    "); } else if (value["station_code"] == "GDGM") { sContent01.push("高明 " + value["name"] + "
    "); sContent02.push("
    "); } else if (value["station_code"] == "GDSD") { sContent01.push("顺德 " + value["name"] + "
    "); sContent02.push("
    "); } } }) $("#tqyj_tit").html(sContent01.join('')); $("#tqyj_con").html(sContent02.join('')); } }); }