html - JavaScript event parameter in Firefox -


i have code:

function buttonhighlight(event, img, name) {      if (img === null) {          img = event.target;      }      img.src = "img/" + name + "_on.png";      img.style.cursor = "pointer";  }    function buttonlosthighlight(event, img, name) {      if (img === null) {          img = event.target;      }      img.src = "img/" + name + "_off.png";      img.style.cursor = "auto";  }
<button type="submit" form="login_form" id="log_window_b" class="fake_button" onclick="loginhandler()">     <img src="img/send_off.png" alt="invia" width="55" height="15" onmouseover="buttonhighlight(event, null, 'send')" onmouseout="buttonlosthighlight(event, null, 'send')">   </button>

if try without event parameter in js function , in html event attribute, works fine in chrome, not in firefox. if use code in firefox doesn't work, works if "event" attribute in function, need other attributes!

is absolute requirement achieve in pure javascript ?

seeing code, done in css.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -