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>
2011-05-31, 3463👍, 0💬
Popular Posts:
Rachel opened her math book and found that the sum of the facing pages was 245. What pages did she o...
How To Delete a User Account? - Oracle DBA FAQ - Managing Oracle User Accounts, Schema and Privilege...
How can JavaScript make a Web site easier to use? That is, are there certain JavaScript techniques t...
Can you please post OpenLink Endur related FAQ's,tutorials,document s.Thanks
How do I install JUnit? First I will download the lastest version of JUnit. Then I will extract all ...