Thanks Ray. I then found that this doesn't work in Firefox so changed 'hand' to 'pointer' (as per W3C standard) and it works in both IE and Firefox.
<input type="submit" value="" style="border-style: none; background: url('images/searchbutton2.gif') no-repeat; width: 24px; height: 20px;" onmouseover="this.style.cursor= 'pointer'">
html search box and onmouseover
Collapse
X
-
Try placing the onmouseover attribute on the actual input tag instead.
In other words:
<input type="submit" value="" style="border-style: none; background: url('images/searchbutton2.gif') no-repeat; width: 24px; height: 20px;" onmouseover="this.style.cursor= 'hand'">
Leave a comment:
-
I would think using a hand icon would be counter intuitive (or do you mean the hand with a finger pointer). A hand normally implies the ability to drag or grab the item, not click on it.
Further, most browsers automatically change the pointer when you mouse over a link, or button.
I have never attempted this in Javscript, so I don't know what is wrong with your code.
Leave a comment:
-
html search box and onmouseover
hello,
i'd like to have the mouse pointer change to a hand when it hovers over the search button of the html search box. i tried this with no luck:
<span onmouseover="this.style.cursor= 'hand'"><input type="submit" value="" style="border-style: none; background: url('images/searchbutton2.gif') no-repeat; width: 24px; height: 20px;"></span>
i know this should be simple but i can't get it to work
thanks.Tags: None
Leave a comment: