I want to pass parameters to function trigerred by click, where first parameter is event object and second is for example some string. I've got something like that:
It works fine in IE and Opera but in FF nothing happens. Can anyone solve this problem? Thanks in advanceHTML Code:function load() { var modal = document.getElementById('modal'); modal.addEventListener('click', function () {placeDiv(event, 'orange')} ) } function placeDiv(e, color) { alert(e.button+' '+color); //test }


Reply With Quote
Bookmarks