本文讲述了JS实现鼠标悬停切换图片,显示天气预报,利用焦点实现选择网站的实例代码,分享给大家供大家参考,具体如下:
鼠标悬停切换图片:
<script type="text/javascript"> function mouseOver() { document.getElementById("b1").src ="diaochan.jpg" } function mouseOut() { document.getElementById("b1").src ="noimage.gif" } </script>
js显示天气预报:
<script type="text/javascript"> </script>
js利用焦点实现选择网站:
<script type="text/javascript"> var i = 1; var focusid; function defau() { document.getElementById("1").focus(); focusid=1; } function showtable() { var id = i + 1; document.getElementById(id).focus(); focusid=id; i++; if (i == 4) { i = 0; } } function openhref() { var href = document.getElementById(focusid).href; document.location = href; } </script> 百度 谷歌 优酷 土豆
http://m.bbyears.com/css/150951.html
推荐访问: