[最佳答案] Use element.addEventListener("eventName", callbackFunction, false) and element.removeEventListener("eventName", callbackFunction). Where eventName is the name of the handler without the 'on'. So onsubmit becomes submit. For documentation of the two functions, see: https://developer.mozilla.org/en/DOM/element.addEventListener https://developer.mozilla.org/en/DOM/element.removeEventListener