Focus an input field : TextField : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » TextField »

 

Focus an input field



<html>

<head>
<script type="text/javascript">
function setfocus(){
    document.forms[0].field.focus()
}
</script>
</head>

<body>

<form>
    <input type="text" name="field" size="30"
    <input type="button" value="Set focus" onclick="setfocus()"
</form>

</body>

</html>




           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Form Control
» TextField