Share on Google+Share on Google+

JavaScript onkeyup event

Advertisement
This section illustrates you the onkeyup event.

JavaScript onkeyup event

This section illustrates you the onkeyup event. It occurs when the user releases a key from its depressed position. Here we have created two textboxes. As the user user enter the text in first textbox, the same value will get display simultaneously.

Here is the code:

<html>
<
head>
<
script language="JavaScript">
function function1() {
document.getElementById("text2").value=document.getElementById("text1").value;
}
</
script>
</
head>
<
input type="text" id="text1" onkeyup="function1()">
<
input type="text" id="text2">
</
body>
</
html>

Output:

Advertisements

Advertisement

Posted on: August 12, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.