0
IE8에서는 Element Interface
을 확장 할 수 있으므로 attachEvent/detachEvent와 같이 추상화 할 수 있습니다 ....htc를 통해 IE7에 addEventListener를 추가하십시오.
if (!window.addEventListener) {
// Internet Explorer 8 provides access to its 'Element' Interface…
window.Element.prototype.addEventListener = function(type, listener, useCapture) {
this.attachEvent('on' + type, listener);
}
window.Element.prototype.removeEventListener = function(type, listener, useCapture) {
this.detachEvent('on' + type, listener);
}
}
...하지만 IE7에서 구현하는 방법은 잘 모르겠습니다. .htc 파일을 통해 가능하다는 소식을 들었습니까?
어떤 방법으로 정확히 표시 할 수 있습니까?
감사를 링크, 나는 이전 만 가져올 수 없습니다 그것이 작동하는 그것을 시도? – Integralist
이것은 시도 (작동하지 않음)입니다 : https://gist.github.com/1363964 – Integralist