Wednesday, February 26, 2014

type to copy text from one to another textbox using simple javascript


html:-
<input type="text" id="simple" name="ship_quantity"  onkeyup="copy_data(this)" />
<input type="text" name="ship_quantity" id="ship_quantity" />

javascript

function copy_data(val){
     var a = document.getElementById("simple").value;

     document.getElementById("ship_quantity").value=a;
    }

No comments: