开发者

How do I make an image change when the mouse is over it HTML?

开发者 https://www.devze.com 2023-01-15 00:27 出处:网络
How do I make an image change when the mouse is over it? Snippet: <body> <!-- Site navigation menu -->

How do I make an image change when the mouse is over it?

Snippet:

<body>

<!-- Site navigation menu -->
<ul class="navbar">
 开发者_JAVA技巧 <li><img src="C:\Users\Drew French\Pictures\Style\SepiaWeb\button_demo5.png" alt="Button 1" /></a>


If you could use jQuery;

$("#ImageID").hover( function() { $(this).attr("src", "new src"); } );

Also check this out Changing the image source using jQuery


You can use CSS or Javascript for this.

http://joemaller.com/js-singleroll.shtml

0

精彩评论

暂无评论...
验证码 换一张
取 消