자바스크립트(JavaScript) javascript, setAttribute IE7, IE8~ 구분 적용
javascript, setAttribute IE7, IE8~ 구분 적용 Example #1 소개용 예제 var onclick = button_element.getAttribute("onclick"); // if onclick is not a function, it's not IE7, so use setAttributeif(typeof(onclick) != "function") { button_element.setAttribute('onclick','doSomething();' + onclick); // for FF,IE8 ~ ,Chrome // if onclick is a function, use the IE7 method and call onclick() in the anonymous function..
2013. 12. 10.