<script> function setFocus() { if(focusElement != null) { document.forms[0].elements["myelementname"].focus(); } } </script>
Javascript
Topic: JS HTML DOM
How to set the focus in an element using Javascript?
Browse random answers:
What is the use of DOM?
How will you submit form using javascript?
How to Finding HTML Elements?
How Will You Get Textbox Value in Javascript?
How to write in browser page using javascript?
How to change a label value using javascript?
What is the disadvantages using innerHTML in JavaScript?
How to set a HTML document's background color?
How to set the focus in an element using Javascript?
What is a fixed-width table and its advantages?
How to make elements invisible?
To write messages to the screen without using "document.write()" ?
How to Add new elements dynamically?
How to change style on an element?
How to remove the event listener:
How to set the cursor to wait.
How to delete an entry using JavaScript?
How do you get field value in Javascript?