Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How to set the focus in an element using JavaScript?
How to set the focus in an element using JavaScript?
✍: Guest
Use the "focus()" method of the element object:
<script>
function setFocus() {
if(focusElement != null) {
document.forms[0].elements["myelementname"].focus();
}
}
</script>
2010-10-19, 3752👍, 0💬
Popular Posts:
How To Return Top 5 Rows? - MySQL FAQs - SQL SELECT Statements with JOIN and Subqueries If you want ...
How To Set Background to Transparent or Non-transparent? - CSS Tutorials - HTML Formatting Model: Bl...
What is shadowing ? When two elements in a program have same name, one of them can hide and shadow t...
How do I use forms? The basic syntax for a form is: <FORM ACTION="[URL]">...&l t;/FORM>Wh...
How do I use forms? The basic syntax for a form is: <FORM ACTION="[URL]">...&l t;/FORM>Wh...