DEMO of onkeypress event
JavaScript
<script language=JavaScript>
<!--
function copy()
{
document.getElementById("t2").value=document.getElementById("t1").value;
}
//-->
</script>
HTML
<input type=text id=t1 name=text onKeyPress=copy();> <br>
(Type minimum two chars)<br><br> will be copied to below textarea. <br>
<textarea id=t2 name=my_text rows=4 cols=30></textarea>
getElementById
← Subscribe to our YouTube Channel here
This article is written by plus2net.com team.
plus2net.com
|