PrepAway - Latest Free Exam Questions & Answers

Which HTML markup should you add to the application?

You develop an HTML5 application for a company. Employees must enter a personal
identification number (PIN) in an INPUT element named SecurityCode to access their
employee records.
The SecurityCode element must meet the following requirements:
Allow up to 6 digits.
Do not display numbers as they are entered.
Display the text Enter PIN Code before the user enters any data.
You need to implement the SecurityCode element.
Which HTML markup should you add to the application?

PrepAway - Latest Free Exam Questions & Answers

A.
Option A

B.
Option B

C.
Option C

D.
Option D

E.
Option E

Explanation:
* The isNaN() function determines whether a value is an illegal number (Not-a-Number).
This function returns true if the value is NaN, and false if not.
* JavaScript Form Validation
JavaScript can be used to validate data in HTML forms before sending off the content to a
server.
Form data that typically are checked by a JavaScript could be:
has the user left required fields empty?
has the user entered a valid e-mail address?
has the user entered a valid date?
has the user entered text in a numeric field?
* document.getElementByID
Returns a reference to the element by its ID.
Syntax
element = document.getElementById(id);
where
element is a reference to an Element object, or null if an element with the specified ID is not
in the document.
id is a case-sensitive string representing the unique ID of the element being sought.
* The getElementsByName() method accesses all elements with the specified name.
Gets a collection of objects based on the value of the NAME or ID attribute.
Syntax
document.getElementsByName(name)

One Comment on “Which HTML markup should you add to the application?


Leave a Reply