GeekInterview.com
Series: Subject: Topic:
Question: 4 of 348

Focus

Use of Focus() method in asp.net
Asked by: ajit008 | Member Since Jun-2012 | Asked on: Jun 23rd, 2012

View all questions by ajit008

Showing Answers 1 - 1 of 1 Answers

The focus() method sets focus to the current window.When web page is loaded you can use a BODY onload event and javascript client code to set focus method().

Example

The above example assumes a web form with ID="Form1" with some controls, including a textbox named TextBox1. To set a focus to TextBox1 when page is loaded we use the above javascript code.

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.