070-480試験無料問題集「Microsoft Programming in HTML5 with JavaScript and CSS3 認定」

You troubleshoot a webpage that contains the following HTML markup: (Line numbers are included for reference only.)

The webpage also contains the following JavaScript function named someEvent() that is declared in the HEAD section of the HTML:
Function someEvent() {
Alert('someEvent fired!');
}
The JavaScript function named someEvent() must run only when the user clicks the DIV element, not the INPUT elements.
You need to modify the webpage to invoke the JavaScript function named someEvent().
What should you do? (Each correct answer presents a complete solution. Choose two.)

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?

解説: (GoShiken メンバーにのみ表示されます)
You develop an HTML5 webpage with custom CSS. You have the following HTML markup:
<div class="new" Item">...</div>
You have the following requirements:
* In addition to your CSS, you must use a corporate branded stylesheet named corporate.css.
* The corporate.css file contains the style rule that must be used for .newsItem.
* You must use the corporate.css file to ensure that the webpage changes when the brand changes.
* You must add additional style rules to the webpage.
* You cannot modify the corporate.css file.
You need to apply the appropriate CSS rules to meet the requirements.
What should you do?

解説: (GoShiken メンバーにのみ表示されます)
You are validating user input by using JavaScript and regular expressions.
A group of pre-defined regular expressions validate two input fields:
You need to use the correct expression to validate the input.
Which expression should you insert into each function? To answer, select the appropriate options from the drop-down lists in the answer area.
正解:

Explanation
You have the following code:

You need to ensure that the content appears as shown in the following exhibit:

Which display attribute should you use for the red div?

解説: (GoShiken メンバーにのみ表示されます)
You need to create a page that displays four columns of text. The columns must be 20px apart, and a double rule must appear between the columns.
How should you complete the CSS markup? To answer, select the appropriate options in the answer area.
NOTE: Each correct selection is worth one point.
正解:

Explanation

Reference: https://www.w3schools.com/Css/css3_multiple_columns.asp
You are modifying a website. The body of the page will be divided into two sections:
* A content section will contain blog posts and comments.
* An area on the right-hand side will contain advertisements.
The page is defined by the following HTML.

The site must conform to HTML5 standards and must use HTML5 semantic tags.
You need to ensure that the advertisements are on the rightmost section of the page.
Which tag should you use?

解説: (GoShiken メンバーにのみ表示されます)
You develop an interactive scalable vector graphic (SVG) application.
You write the following code (Line numbers are included for reference only.):

You need to increase the size of the circle by 50 percent.
Which code segment should you insert at line 02?

解説: (GoShiken メンバーにのみ表示されます)
You develop a webpage by using HTML5.
The user interface of the webpage must show a gray-lined box that contains the label Enter your information:.
Inside the box are two labels and two input boxes. The first input box must be labeled Name:. The second input box must be labeled Email:. Below the box is a Submit button.
The user interface must look like the following;

You need to create the user interface.
Which markup should you use?

解説: (GoShiken メンバーにのみ表示されます)
You have the following code. (Line numbers are included for reference only.)

You execute the code and you receive an alert that displays the following message: "Undefined".
You need to ensure that the alert displays as shown:

What should you do?

解説: (GoShiken メンバーにのみ表示されます)
You develop code in JavaScript. The code calls a functions named fnl.
Sometimes, fnl throws a RangeError on a SyntaxError error.
You need to create code to meet the following requirements:
* Catch the error.
* Call the catchRangeError function if RangeError is thrown.
* Call the catchSyntaxError function if SyntaxError is thrown.
Develop the solution by selecting and arranging the required code blocks in the correct order. You may not need all of the code blocks.
正解:

Explanation
try {
fnl();
} catch(error) {
if (error.name === 'RangeError') {
catchRangeError();}
else if (error.name === 'SyntaxError') {
catchSyntaxErrorr();}
}
You are developing a form that captures a user's email address by using HTML5 and jQuery.
The form must capture the form elements as a string.
You need to implement this functionality.
How should you develop the form? (To answer, drag the appropriate code segment to the correct target or targets in the answer area. Each code segment 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.)
正解:

Explanation

* The serialize() method creates a URL encoded text string by serializing form values.
You can select one or more form elements (like input and/or text area), or the form element itself.
The serialized values can be used in the URL query string when making an AJAX request.
Example: $("form").serialize());
* decodeURIComponent
The decodeURIComponent() function decodes a URI component.
Return Value:A String, representing the decoded URI
Incorrect:
Not decodeURI:
decodeURI is intended for use on the full URI.
decodeURIComponent is intended to be used on .. well .. URI components that is any part that lies between separators (; / ? : @ & = + $ , #).
Reference: jQuery serialize() Method
You review code that uses WebSockets for a browser-based multiplayer game. Each player sends a move to the server, which then sends the move to all connected game instances. The following code runs in the browser and handles the sending and receiving of moves:

For each statement in the table, select Yes if the code segment above causes the page to behave as described.
Select No if it does not. Make only one selection in each column.
正解:

Explanation