Focus

Use of Focus() method in asp.net

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.

  Was this answer useful?  Yes

Give your answer:

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

 

Related Answered Questions

 

Related Open Questions