Thursday, December 13, 2012

Auto Fill second input box js

Auto Fill second input box Java Scripts 




when you fill first  input box above second one fills automatically by using the Java Scripts bellow

<html>
<head>
<script type="text/javascript">
    function copy_data(val){
     var a = document.getElementById(val.id).value
     document.getElementById("copy_to").value=a
    }

    </script>
</head>
<body>
<input type="text" name ="a" id="copy_from" onkeyup="copy_data(this)"/>
<input type="text" name ="a" id="copy_to"/>
</body>
</html>

No comments:

Post a Comment