You are developing a customer web form that includes the following HTML.
A customer must enter a value in the text box prior to submitting the form.
You need to add validation to the text box control.
Which HTML should you use?
You are developing a customer web form that includes the following HTML.
A customer must enter a value in the text box prior to submitting the form.
You need to add validation to the text box control.
Which HTML should you use?
To ensure that a customer must enter a value in the text box before submitting the form, you should use the 'required' attribute within the input tag. The correct HTML should be <input id='txtValue' type='text' required='required'/>. This attribute is a boolean attribute that specifies that the input field must be filled out before the form can be submitted.
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.)
Select and Place:
Box 1-3: The is used for input fields that should contain a value within a range.
Example -
Box 4-5: Use the value attribute to set the default value
Box 6: Definition and Usage -
The required attribute is a boolean attribute.
When present, it specifies that an input field must be filled out before submitting the form.
Example -
Username:
Reference: HTML Input Types -
http://www.w3schools.com/html/html_form_input_types.asp
You are developing an HTML5 web application that displays the current temperature whenever a button is clicked. The following code provides this functionality.
When the temperature is loaded, the status property on the loader instance does not change.
You need to ensure that the status property on the loader instance is updated when the temperature is loaded.
Which code segment should you use to replace the Loader function?
The issue with the original code is that it does not update the `status` property of the `loader` instance because it is using a local variable `status` instead of the instance property `this.status`. To fix this, the code must update `this.status` to ensure that it changes the instance property when `updateStatus` is called. Therefore, the replacement code should use `this.status` to correctly update the instance property, which is implemented in Option A. This ensures that when `newStatus` is assigned, it modifies the `status` property of the `loader` instance.
You are creating a class named Consultant that must inherit from the Employee class. The Consultant class must modify the inherited PayEmployee method. The
Employee class is defined as follows.
function Employee() {}
Employee.prototype.PayEmployee = function ( ){
alert('Hi there!');
}
Future instances of Consultant must be created with the overridden method.
You need to write the code to implement the Consultant class.
Which code segments should you use? (Each correct answer presents part of the solution. Choose two.)
To create the Consultant class that inherits from the Employee class and overrides the PayEmployee method, you should ensure that Consultant.prototype.PayEmployee properly overrides the inherited method. First, you need to set up inheritance by creating the Consultant constructor function that calls the Employee constructor. Then, you assign a new instance of Employee to Consultant's prototype and set the constructor property. This allows instances of Consultant to use the overridden method. The code segment B effectively overrides the inherited PayEmployee method with Consultant.prototype.PayEmployee, and the code segment C properly sets up the inheritance and constructor.
You are modifying an existing web page. The page is being optimized for accessibility. The current page contains the following HTML.
Standards-compliant screen readers must be able to identify the links contained within the navigation structure automatically.
You need to create the navigation link structure in the page.
With which container tags should you wrap the existing markup?
To optimize the webpage for accessibility, the appropriate container tag to wrap around navigation links is the <nav> tag. The <nav> tag is specifically designed for navigation purposes, making it easier for screen readers and other assistive technologies to identify the navigation structure of a webpage. This improves the user experience for individuals using such technologies. Other options like <div> and <map> tags do not provide the same semantic meaning for navigation purposes, and <navmap> is not a valid HTML tag. Therefore, the correct choice is to use the <nav> tag.