前台代码 <div id=soutu> <div id=zhuan>这里只是放一张图片而已 <img alt= src=/Images/ajpg width= height= /> </div> </div> <div id=tuzi>这里调用脚本函数 <a # onmousemove=showLink() class=aTaohang></a> <a # onmousemove=showLink()class=aTaohang></a> <a # onmousemove=showLink() class=aTaohang></a> <a # onmousemove=showLink() class=aTaohang></a> </div> 脚本这里可我做成一个JS文件放在前台调用这样就方便点 var time = windowsetInterval(luen() ); function showLink(num) { windowclearTimeout(time); if (num == ) { documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height= /></div> } if (num == ) { documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height=/></div> } if (num == ) { documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height=/></div> } if (num == ) { documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height=/></div> } } function out() { time = windowsetInterval(luen() ); } var tmp = ; function luen() { tmp++; if (tmp == ) { documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height=/></div> } else if (tmp == ) { documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height=/></div> } else if (tmp == ) { documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height=/></div> } else if (tmp == ) { documentgetElementById(soutu)innerHTML = <div id=zhuan ><img src=/DataImages/jpg width= height=/></div> } else { tmp = ; } } function showbuy(divId) { documentgetElementById(divId)styledisplay = block; } function disbuy(divId){ documentgetElementById(divId)styledisplay = none; } 样式 aTaohang { display: block; float: left; fontsize: px; fontweight: ; color: White; backgroundcolor: Gray; width: px; height: px; textalign: center; margin: px; textdecoration: none; } aTaohang:hover { color: Gray; backgroundcolor: White; } |