Friday, 6 June 2014

How to set Textbox

<script type="text/javascript">
        function OnButtonClick() {
            var textcontrol = document.getElementById("txtname");
            textcontrol.value = "Arun";
        }
 
    </script>
 

<pre lang="HTML">
 
 <input type="text" id="txtname" />
    <input type="button" id="btnsubmit" onclick="OnButtonClick()" value="Submit" />

1 comment: