|
Top / JavaScript 1/12のJavaScriptの訂正箇所
image1.gif と image2.gif を用意しておきます。 <html> <head><title>サンプル</title></head> <body> <p>ロールオーバのサンプル(リンクあり版)<br> <A href="index.html" onMouseOver="document.images['button0'].src='image2.gif'" onMouseOut="document.images['button0'].src='image1.gif'"><br> <img name="button0" border="0" src="image1.gif" width="100" height="100"></a> </p> </body> </html> <html> <head><title>サンプル</title></head> <body> <p>ロールオーバのサンプル(リンクなし版)<br> <A href="javascript:void(0)" onMouseOver="document.images['button0'].src='image2.gif'" onMouseOut="document.images['button0'].src='image1.gif'"><br> <img name="button0" border="0" src="image1.gif" width="100" height="100"></a> </p> </body> </html> |