Home »

How to set the focus in an element using Javascript?

Question ListCategory: JavascriptHow to set the focus in an element using Javascript?
jeanderson295 author asked 9 years ago
1 Answers
shah_kajal184 author answered 8 years ago

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

Please login or Register to Submit Answer