Home > DeveloperSection > Interviews > How to set the focus in an element using Javascript?

Posted on    May-18-2011 9:33 AM

 JavaScript JavaScript 
 1 Answer(s)
  1708  View(s)
Rate this:

Awadhendra Tiwari

Total Post:510

Posted on    May-18-2011 12:00 AM

<script> function setFocus() { if(focusElement != null) { document.forms[0].elements["myelementname"].focus(); } } </script>

Don't want to miss updates? Please click the below button!

Follow MindStick