DRAG DROP
You are developing a web page for runners who register for a race. The page includes a slider control
that allows users to enter their age.
You have the following requirements:
All runners must enter their age.
Applications must not be accepted from runners less than 18 years of age or greater than 90 years.
The slider control must be set to the average age (37) of all registered runners when the page is first
displayed.
You need to ensure that the slider control meets the requirements.
What should you do? (To answer, drag the appropriate word or number to the correct location in
the answer area. Each word or number 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.)
You need to ensure that the slider control meets the requirements
DRAG DROP
You are developing a web page for runners who register for a race. The page includes a slider control
that allows users to enter their age.
You have the following requirements:
All runners must enter their age.
Applications must not be accepted from runners less than 18 years of age or greater than 90 years.
The slider control must be set to the average age (37) of all registered runners when the page is first
displayed.
You need to ensure that the slider control meets the requirements.
What should you do? (To answer, drag the appropriate word or number to the correct location in
the answer area. Each word or number 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.)
http://plnkr.co/edit/NNDy0GWOP1q4FLrEdZ01?p=preview
The answer is correct but the line of code that states “Step=5” makes no sense as an age measurement. Only people with ages in increments of 5 after 18 can be selected (18, 23, 28, 33, 38, etc…)
Also due to the step amount being 5 and starting at 18, the default value of the slider will go to the closest appropriate value of 38 instead because 37 is not a selectable value.
A questão esta correta.
A sua implementação esta errada.
Segue correção:
function revealSlider(){
var teste = document.getElementById(“ageIdade”);
alert(“Value is ” + teste.value);
}
HTML
–
–
–
–
–
–
–
–
–
–
–
–
–
–
–
// Code goes here
function revealSlider(){
var teste = document.getElementById(“ageIdade”);
alert(“Value is ” + teste.value);
}