Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

.change() in pure js


function addEventHandler(elem, eventType, handler) {
    if (elem.addEventListener)
        elem.addEventListener (eventType, handler, false);
    else if (elem.attachEvent)
        elem.attachEvent ('on' + eventType, handler); 
}

Source by nullorempty.org #
 
PREVIOUS NEXT
Tagged: #pure #js
ADD COMMENT
Topic
Name
4+7 =