READ Free Dumps For Microsoft- 70-480
Question ID 15000 | You develop an HTML5 webpage that contains the following HTML markup:
<input id="loanTermTextBox" type="text" />
Users must enter a valid integer value into the text box.
You need to validate the data type that is received from the input element.
Which two code segments should you include on the webpage? (Each correct answer
presents a complete solution. Choose two.)
|
Option A | Option A
|
Option B | Option B
|
Option C | Option C
|
Option D | Option D
|
Option E | Option E
|
Correct Answer | A,B |
Explanation Explanation: * parseInt The parseInt() function parses a string and returns an integer. Syntax: parseInt(string,radix) string Required. The string to be parsed radix Optional. A number (from 2 to 36) that represents the numeral system to be used. * 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. Reference: JavaScript parseInt() Function; JavaScript isNaN() Function
Question ID 15001 | You are validating user input by using built-in JavaScript functions.
The application must:
✑ Store the value that is entered in a variable named inputValue
✑ Use the built-in isNaN(tnputValue) function to evaluate the data type
You need to validate the return value of the isNaN(inputValue) function.
Which values will be returned? (To answer, configure the appropriate options in the dialog
box in the answer area.)
|
Option A |
Explanation: isNan is false for all these inputs. 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.
|
Correct Answer | A |
Explanation