focus() eehh?

  • Thread starter Thread starter vinnie
  • Start date Start date
V

vinnie

i'm a begineer in C3, and while studying the controls, i found the
focus() method without any real explanatory paragraph. So on MSDN
library and docs, they just say

"Causes the element to receive the focus and executes the code
specified by the onfocus event"

Since i don't know what is the "focus()", can someone help me with a
very easy example? (Please not just the code)

For example, what happend when a page os loaded and there is/isn't the
focus() method?

Thanks
 
vinnie said:
i'm a begineer in C3, and while studying the controls, i found the
focus() method without any real explanatory paragraph. So on MSDN
library and docs, they just say

"Causes the element to receive the focus and executes the code
specified by the onfocus event"

Since i don't know what is the "focus()",

The control that has focus is the active control, and is usually marked
with a dotted border. Events like KeyDown is first sent to the control
having focus.
can someone help me with a
very easy example? (Please not just the code)

For example, what happend when a page os loaded and there is/isn't the
focus() method?

Thanks

It sounds like you are talking about a web control rather than a windows
control. Then it's rather different, as the C# code is run on the
server, and the control only exists in the browser. Javascript code is
added to the page and run when the page loads in the browser, giving the
control focus.
 
Back
Top