Home » Interview » Technology

How to Accessing Elements using javascript?

Correct Answer: The elements of JavaScript are accessed by their names By default the browser is accessed by the element ‘windows’ and the page by ‘document’ The corresponding element has user defined names for forms and its elements For example var pwd = windowsdocumentfrmLoginpasswordvalue; assigns the value of the password field of the form fromLogin in the current document, where password is the name of the element and frmLogin is the name of the form Like wise any form element is accessed

← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion