Focus some controls

D

Dave

Hello.

How can I set focus to some controls?
For example I want to set focus to some textbox when the page is loaded or
when I click on some button.
And I have one more question: how can set some button as default button for
the form?

Thank you.
 
K

Kevin Spencer

Maybe they neeed some Ritalin or Adderol. I know I do!

--
;-),
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
K

Kevin Spencer

Sorry about the bad joke. Here's the answer:
How can I set focus to some controls?

JavaScript: document.getElementById("elementID").focus();
And I have one more question: how can set some button as default button for
the form?

Make it the Submit button.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top