JS Bagaimana cara melampirkan event handler hanya sekali
document.getElementById("myelement").addEventListener("click", handler);
// handler function
function handler(e) {
// remove this handler
e.target.removeEventListener(e.type, arguments.callee);
alert("You'll only see this once!");
}
Old Knight