How to set the default focus in an element using Javascript?

 Posted by vishalneeraj-24503 on 1/13/2014 | Category: JavaScript Interview questions | Views: 753 | Points: 40
Answer:

<script type="text/javascript" language = "javascript"> function set_default_focus() 

{
document.forms[0].elements["txt_first_name"].focus();
}
</script>


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response