EDN Admin
Well-known member
When a browser displays the HTML sent from a web server it parses the received markup into a Document Object Model, or DOM, which models the markup as a hierarchical structure.
Each element in the markup - the
element,
elements,
elements,
elements, and so on - are represented as a node in the DOM and can be programmatically accessed from client-side script. Whats more, the nodes that make up the DOM
have functions that can be called to perform certain behaviors; what functions are available depend on what type of element the node represents.
One function common to most all node types is
, which gives keyboard focus to the corresponding element. The
function is commonly
used in data entry forms, search pages, and login screens to put the users keyboard cursor in a particular textbox when the web page loads so that the user can start
typing in his search query or username without having to first click the textbox with his mouse. Another useful function is
, which is available for
and
elements and selects the contents of the textbox.
This article shows how to call an HTML elements
and
functions. Well look at calling these functions directly from client-side
script as well as how to call these functions from server-side code. Read on to learn more!
http://www.4guysfromrolla.com/articles/021611-1.aspx" class="readmore Read More >
View the full article
Each element in the markup - the
Code:
<form>
Code:
Code:
Code:
<input>
have functions that can be called to perform certain behaviors; what functions are available depend on what type of element the node represents.
One function common to most all node types is
Code:
focus
Code:
focus
used in data entry forms, search pages, and login screens to put the users keyboard cursor in a particular textbox when the web page loads so that the user can start
typing in his search query or username without having to first click the textbox with his mouse. Another useful function is
Code:
select
Code:
<input>
Code:
<textarea>
This article shows how to call an HTML elements
Code:
focus
Code:
select
script as well as how to call these functions from server-side code. Read on to learn more!
http://www.4guysfromrolla.com/articles/021611-1.aspx" class="readmore Read More >
View the full article