Dự báo thời tiết đính kèm avatar khí tượng. Được cập nhật bởi Zing.vn.
<div class="panel-content" id="sidebar_thoitiet" style="display: block">
<div align="center">
<script type="text/javascript" src="http://zing.vn/util/weather.js"></script>
<script type="text/javascript">
var tpWeather;
function change(tentp,nhietdo,anh,thoitiet,doam,gio)
{
document.getElementById("ttNhietDo").innerHTML=nhietdo;
document.getElementById("ttAnh").innerHTML='<img src="http://www.zing.vn/news/images/weather/'+anh+'" />';
document.getElementById("ttThoitiet").innerHTML=thoitiet+'<br />Độ ẩm: '+doam+'<br />'+gio;
}
function ShowWeatherBox(intVal)
{
change(weather[intVal][1],weather[intVal][2],weather[intVal][3],weather[intVal][4],weather[intVal][5],weather[intVal][6]);
}
function ShowWeather()
{
var strcboWeather='';
for(var i=0;i<weather.length;i++)
{
if(weather[i][0]=='t-p-ho-chi-minh')tpWeather=i;
strcboWeather+='<option value="'+i+'"'+(weather[i][0]=='t-p-ho-chi-minh'?' selected="selected"':'')+'>'+weather[i][1]+'</option>';
}
//document.getElementById("cboWeather").innerHTML= strcboWeather;
};
</script>
<select id="cboWeather" class="ttfontselect" onchange="ShowWeatherBox(this.value);">
<script>
var strcboWeather='';
for(var i=0;i<weather.length;i++)
{
if(weather[i][0]=='t-p-ho-chi-minh')tpWeather=i;
strcboWeather+='<option value="'+i+'"'+(weather[i][0]=='t-p-ho-chi-minh'?' selected="selected"':'')+'>'+weather[i][1]+'</option>';
}
document.write(strcboWeather)
</script>
</select>
<br>
<table cellspacing="0" cellpadding="0" border="0" width="160" style="margin-bottom: 5px;">
<tbody>
<tr>
<td nowrap="nowrap" align="center" width="40%" valign="bottom" class="ttfont">Nhiệt Độ:</td>
<b><td id="ttNhietDo" class="ttNhietdo"> </td></b>
</tr>
<tr>
<td height="65" align="center" id="ttAnh" style="padding-top: 2px; padding-bottom: 4px;"> </td>
<td height="65" id="ttThoitiet" class="ttfont" style="padding-bottom: 4px;"> </td>
</tr>
</tbody>
</table>
<script type="text/javascript" language="javascript">ShowWeatherBox(6);</script>
</div> </div>
<div align="center">
<script type="text/javascript" src="http://zing.vn/util/weather.js"></script>
<script type="text/javascript">
var tpWeather;
function change(tentp,nhietdo,anh,thoitiet,doam,gio)
{
document.getElementById("ttNhietDo").innerHTML=nhietdo;
document.getElementById("ttAnh").innerHTML='<img src="http://www.zing.vn/news/images/weather/'+anh+'" />';
document.getElementById("ttThoitiet").innerHTML=thoitiet+'<br />Độ ẩm: '+doam+'<br />'+gio;
}
function ShowWeatherBox(intVal)
{
change(weather[intVal][1],weather[intVal][2],weather[intVal][3],weather[intVal][4],weather[intVal][5],weather[intVal][6]);
}
function ShowWeather()
{
var strcboWeather='';
for(var i=0;i<weather.length;i++)
{
if(weather[i][0]=='t-p-ho-chi-minh')tpWeather=i;
strcboWeather+='<option value="'+i+'"'+(weather[i][0]=='t-p-ho-chi-minh'?' selected="selected"':'')+'>'+weather[i][1]+'</option>';
}
//document.getElementById("cboWeather").innerHTML= strcboWeather;
};
</script>
<select id="cboWeather" class="ttfontselect" onchange="ShowWeatherBox(this.value);">
<script>
var strcboWeather='';
for(var i=0;i<weather.length;i++)
{
if(weather[i][0]=='t-p-ho-chi-minh')tpWeather=i;
strcboWeather+='<option value="'+i+'"'+(weather[i][0]=='t-p-ho-chi-minh'?' selected="selected"':'')+'>'+weather[i][1]+'</option>';
}
document.write(strcboWeather)
</script>
</select>
<br>
<table cellspacing="0" cellpadding="0" border="0" width="160" style="margin-bottom: 5px;">
<tbody>
<tr>
<td nowrap="nowrap" align="center" width="40%" valign="bottom" class="ttfont">Nhiệt Độ:</td>
<b><td id="ttNhietDo" class="ttNhietdo"> </td></b>
</tr>
<tr>
<td height="65" align="center" id="ttAnh" style="padding-top: 2px; padding-bottom: 4px;"> </td>
<td height="65" id="ttThoitiet" class="ttfont" style="padding-bottom: 4px;"> </td>
</tr>
</tbody>
</table>
<script type="text/javascript" language="javascript">ShowWeatherBox(6);</script>
</div> </div>
0 comments:
Post a Comment