Home > DeveloperSection > Interviews > How to remove the Event Listener?

Posted on    March-18-2011 12:00 AM

 JavaScript JavaScript 
 1 Answer(s)
  1338  View(s)
Rate this:

Amit Singh

Total Post:565

Posted on    March-18-2011 12:00 AM

<script type="text/javascript">
document.getElementById("hitme4").removeEventListener("click", hitme4, false);

Key Events

"onkeydown", "onkeypress", "onkeyup" events are supported both in ie and standards-based browsers.

<script type="text/javascript">
function setStatus(name,evt) {
evt = (evt) ? evt : ((event) ? event : null); /* ie or standard? */
var charCode = evt.charCode;
var status = document.getElementById("keyteststatus");
var text = name +": "+evt.keyCode;
status.innerHTML = text;
status.textContent = text;
<form action="">
<input type="text" name="keytest" size="1" value=""
<p id="keyteststatus">status</p>

Don't want to miss updates? Please click the below button!

Follow MindStick