| Exam Code/Number: | 98-382Join the discussion |
| Exam Name: | Introduction to Programming Using JavaScript |
| Certification: | Microsoft |
| Question Number: | 40 |
| Publish Date: | Sep 01, 2026 |
|
Rating
100%
|
|
HOTSPOT
You analyze the following code fragment. Line numbers are included for reference only.


DRAG DROP
You are creating a web page that requests a username.
You create the following HTML form:
You need to write a function that retrieves the username from the form.
How should you complete the code? To answer, drag the appropriate code segments to the correct locations. Each function may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.
NOTE: Each correct selection is worth one point.

HOTSPOT
You need to evaluate the following code segment. Line numbers are included for reference only.
Use the drop-down menus to select the answer choice that answers each question based on the information presented in the code segment.

HOTSPOT
Your instructor has asked you to write a program that uses simple rules to help determine if a person should take the train, drive their car, or ride a bike, depending on the conditions of the weather and the amount of gas in the car's tank.
The program has the following requirements:
* When the temperature is above 65 degrees and it is not raining, the person should be told to ride their bike.
* When it is raining, the person should be told to drive their car.
* If their car has half a tank of gas or less, they should be told to take the train.
How should you complete the code? To answer, select the appropriate code segments in the answer area.


HOTSPOT
You are designing a web page that contains a blue button. When the button is pressed, it should call a function that displays the message 'Welcome!'. When the cursor hovers over the button, the button should turn red. When the cursor leaves the button, the button should revert back to its original color of blue.
You want to complete the markup using the appropriate HTML events.
How should you complete the markup? To answer, select the appropriate event in the answer area.
NOTE: Each correct selection is worth one point.

