Widget dự báo thời tiết của 9 tỉnh thành từ Zing.vn
Thứ Sáu, 16 tháng 7, 2010
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>
Tăng cỡ chữ
Mặc định
Giảm cỡ chữ
Liên hệ mail: tpm1512@yahoo.com và xem tất cả bài viết trang này
Tại đây
Nhấn vào theo dõi thăm trang web của Trần Phúc Minh
-
https://yogaso1.blogspot.com/2010/07/widget-du-bao-thoi-tiet-cua-9-tinh.html?m=0
Minh cám ơn bạn đã quan tâm và rất vui vì bài viết đã đem lại thông tin hữu ích cho bạn.
MENU
Sản phẩm
Trang chủ
Nổi bậc
Tiện ích
Tài khoản
Tác vụ
YOUTUBE
Trang chủ
Lên trên
Tổng số Bình luận [ 0]
Đăng nhận xét