1、头部JS
function hnShowNewsPic(num){
for(i=1;i<7;i++){
document.getElementById("hn_news_pic"+i).src = "images/normal.gif";
}
document.getElementById("hn_news_pic"+num).src = "images/active.gif";
}
2、页面HTML:
<div class="hn_news">
<ul>
<li><img id="hn_news_pic1" src="images/active.gif" οnmοusemοve="hnShowNewsPic(1);" /></li>
<li><img id="hn_news_pic2" src="images/normal.gif" οnmοusemοve="hnShowNewsPic(2);"/></li>
<li><img id="hn_news_pic3" src="images/normal.gif" οnmοusemοve="hnShowNewsPic(3);"/></li>
<li><img id="hn_news_pic4" src="ima