Thursday, 16 April 2015

change drop down event automatically clear in text box

 <select onchange="cleartextbox()">
    <option value="libero">libero</option>
    <option value="Ram">Ram</option>
    </select>
   
    <script type="text/javascript">
    function cleartextbox() {
    document.getElementById("mark").value = "";
    }
    </script>
   
    <label>
    <span>Mark</span>
    <input  type="text" name="mark" id="mark" >
    </label>


Demo

No comments:

Post a Comment