onmouseover event not firing in Firefox on div tags with only input fields
I'm trying to display a button when an input field is hovered over. Everything works fine in chrome and IE but in Firefox it fails. Her开发者_如何学编程e's a simple example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en-US">
<head/>
<body>
<div onmouseover="alert('Firefox/chrome/ie all trigger me')">foo</div>
<div onmouseover="alert('Chrome/ie trigger me but fire fox won't')">
<input id="date_01" type="text" disabled="" tabindex="1">
</div>
</body>
</html>
Mousing over the first div causes the alert to display. Mousing over the second div doesn't cause the alert to trigger in Firefox.
Is there any reason this doesn't work properly in firefox? or any common work arounds?
This may have to do with the fact that the input field is disabled? Firefox does not show tooltips on disabled input fields
The disabled="" attribute is misleading - as long as you have the word disabled, it really doesn't matter what you're setting it to, the field will still be disabled.
精彩评论