1.将下面的代码复制到 <head> 内 <style> <!-- //change the file path below to the image you want initially applied to the button .initial{font-weight:bold;background-image:url(firstimage.jpg)} //--> </style> <script> <!-- /* Rollover background-image Script- ?Dynamic Drive (www.dynamicdrive.com) For full source code, installation instructions, 100's more DHTML scripts, and Terms Of Use, visit dynamicdrive.com */ if (document.images){ after=new Image() //change the file path below to the image you want applied when the mouse moves over after.src="secondimage.jpg" } function change2(image){ var el=event.srcElement if (el.tagName=="INPUT"&&el.type=="button") event.srcElement.style.backgroundImage="url"+"('"+image+"')" } function jumpto2(url){ window.location=url } //--> </script> 2.将下面的代码复制到 <body> 或者内 <form onMouseover="change2('secondimage.jpg')" onMouseout="change2('firstimage.jpg')"> <input type="button" value="Example 1 " class="initial" onClick="jumpto2('1.htm')"> <br> <input type="button" value="Example 2 " class="initial" onClick="jumpto2('2.htm')"> <br> <input type="button" value="Example 3 " class="initial" onClick="jumpto2('3.htm')"> <br> </form> 载入中... 载入中...
Copyright © 2000-2006 Nkcn.Net 天津网站优化 All Rights Reserve.