You develop an HTML5 webpage. You have the following JavaScript code:

You need to handle the click event when a user clicks the showDialog button.
Which code segment should you insert at line 02?
Answer : D
Syntax: .on( events [, selector ] [, data ], handler )
* Example:
$(function() {
$(document).on('click', '.get-widgets', function (e) {
You are developing a web form that includes the following HTML.
You need to ensure that a value is entered into txtValue before the form is submitted.
Which code segment should you use?

Answer : C
You develop an HTML5 webpage. You have the following HTML markup:
You need to prevent users from entering specific characters into the username field.
What should you do?
Answer : B
The change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user.
Use the change event and an anonymous function to detect illegal specific characters in the input.
You are developing a web application by using HTML5.
You have the following requirements.
The color of a menu item must change when a user hovers over the item.
The color of the menu item must change back to its original color after five seconds.
You need to ensure that the animation is applied to all menu items.
Which CSS3 code should you use?

Answer : C
transition-property
The transition-property property specifies the name of the CSS property the transition effect is for (the transition effect will start when the specified CSS property changes).
Tip: A transition effect could typically occur when a user hover over an element.
Note: Always specify the transition-duration property, otherwise the duration is 0, and the transition will have no effect.
CSS3 transition-property Property
You are developing an HTML5 web application that displays stock information.
The application loads information from a web service by using AJAX.
The following code defines a Stock object and loads stock data.

You need to implement the loadStock function.
Which code segment should you use?

Answer : A
You develop an HTML5 webpage. You have the following HTML markup:

You also have the following JavaScript code:

You need to post messages by using the HTML5 WebSocket API.
Which code segment should you use?
Answer : B
References:
https://www.tutorialspoint.com/html5/html5_websocket.htm
You are developing a web form that includes the following HTML.
You need to ensure that a value is entered into txtValue before the form is submitted.
Which code segment should you use?

Answer : A
* Input Text Object Properties include:
value: Sets or returns the value of the value attribute of the text field
* Check if text is a null value or an empty string.
Incorrect:
not .get(): there is no input text object property get.