Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How to remove the event listener?
How to remove the event listener?
✍: Guest
<script type="text/javascript"><!--
document.getElementById("hitme4").removeEventListener("click", hitme4, false);
// -->
</script>
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;
}
</script>
<form action="">
<input type="text" name="keytest" size="1" value=""
onkeyup="setStatus('keyup',event)"
onkeydown="setStatus('keydown',event)"
/>
<p id="keyteststatus">status</p>
</form>
2009-01-28, 4427👍, 0💬
Popular Posts:
Can Two Forms Be Nested? - XHTML 1.0 Tutorials - Understanding Forms and Input Fields Can two forms ...
.NET INTERVIEW QUESTIONS - Can we use events with threading ? Yes, you can use events with thread; t...
How to create arrays in JavaScript? We can declare an array like this var scripts = new Array(); We ...
How to create a thread in a program? You have two ways to do so. First, making your class "extends" ...
How To Concatenate Two Character Strings? - MySQL FAQs - Introduction to SQL Basics If you want conc...