A

Admin • 833K Points
Coach

Q. Consider the below code:
Identify the correct code in order to fetch the value entered in username text field?

Code:
< body>
< form name="register">
Enter username < input value="John" id="name" name="username">
< /form>
< /body>
  • (A) document.register.name.value
  • (B) document.getElementById ("name").value
  • (C) document.getElementByName ("name").value
  • (D) None of the above
  • Correct Answer - Option(B)
  • Views: 26
  • Filed under category JavaScript
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.