There are 100,500 articles on the Internet about how to hang up a click event.
What does it hang in the attributes of the DOM elements.
I try to follow the concept of "unobtrusive" js.
Therefore, the question is how to hang an event for example on a link.
I try this:
document.getElementById('bold').onclick = function(element){ mainArea.focus(); document.execCommand('bold', null, ''); element.preventDefault(); }; But something does not come out ...
Advise.
Thank!
document.execCommandoronclick? Yes, and not element, but event - for semantics. =) - ling