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

You are troubleshooting a web page that includes the following code. (Line numbers are included for reference only.)

What is displayed in the alert from line 11?

解説: (JPNTest メンバーにのみ表示されます)
You are developing a customer contact form that will be displayed on a page of a company's website. The page collects information about the customer.
If a customer enters a value before submitting the form, it must be a valid email address.
You need to ensure that the data validation requirement is met.
What should you use?

解説: (JPNTest メンバーにのみ表示されます)
You are developing a web application that uses web workers to process images extracted from an HTML5 CANVAS object on a web page.
You need to pass messages between the web workers and the web page.
Which three types of objects should you use? (Each correct answer presents a complete solution. Choose three.)

正解:A、B、D 解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
You develop an HTML application that contains a table that displays a list of products. The table is defined with the following HTML markup:

You must style the table to look like the following image:

You need to implement the CSS selectors to select the rows that must have a blue background.
Which CSS selector should you use?

解説: (JPNTest メンバーにのみ表示されます)
You create an HTML5 webpage. You have the following HTML markup:

You also have the following JavaScript code segment:
var jsonFruit = { "apples" : "12", "bananas" : "8", "watermelon" : "3" } You need to add additional rows to the fruitTable element by processing the jsonFruit values in the order listed.
Which three actions should you perform in sequence? (Develop the solution by selecting the required code segments and arranging them in the correct order.)
正解:

Explanation
Box 1:

Box 2:

Box 3:

* The appendTo() method inserts HTML elements at the end of the selected elements.
* example to loop over a JavaScript array object.
var json = [
{"id":"1","tagName":"apple"},
{"id":"2","tagName":"orange"},
{"id":"3","tagName":"banana"},
{"id":"4","tagName":"watermelon"},
{"id":"5","tagName":"pineapple"}
];
$.each(json, function(idx, obj) {
alert(obj.tagName);
});
Reference: jQuery appendTo() Method;JQuery Loop Over JSON String - $.Each Example
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?

解説: (JPNTest メンバーにのみ表示されます)
You are developing an HTML5 page that includes several paragraph elements.
You have the following requirements:
Add a drop shadow that is one inch below the text in the paragraph
Set the radius of the drop shadow to five pixels
You need to style the paragraphs to meet the requirements.
Which CSS style should you use?

解説: (JPNTest メンバーにのみ表示されます)
You have the following CSS markup that renders a red rectangle on a webpage.

How large will the red rectangle appear when it renders on the page?

解説: (JPNTest メンバーにのみ表示されます)
You create a JavaScript object named processor as shown in the following code.

You need to ensure that when the code executes, a dialog box displays the alert 'Process done'.
How should you complete the code? To answer, drag the appropriate code elements to the correct targets. each code element 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.
正解:

Explanation

Target 1: bind
Target 2: displayProcessDone
You are developing an HTML5 application for a company. You apply the following style to a DIV element on a page.

You need to submit a draft illustration of the results of this code.
Which illustration should you submit? (To answer, select the appropriate illustration in the answer area.)
正解:

Explanation

Example:
div {
border: 3px solid;
background: #b6aaaa;
width: 200px;
height: 100px;
top 10%;
left 10%;
border-radius: 25px 0px 25px 0px;
}
Result:

Reference: CSS3 border-radius Property
You develop an HTML5 application that allows images to be dragged and dropped within a webpage. The webpage contains a DIV element and four IMG elements as defined in the code segment below:

You need to enable drag and drop for the application.
How should you complete the relevant code? (To answer, select the appropriate option from each drop-down list in the answer area.)

正解:

Explanation

* setData method (dataTransfer)
Specifies the data and its format for the current drag-and-drop operation.
* getData method (dataTransfer)
Retrieves the specified formatted data from the current drag-and-drop operation.
You need to test the value of the following variable in JavaScript.
var length = "75";
A block of code must execute if the length equals 75 regardless of the data type.
You need to use the statement that meets this requirement.
Which lines of code should you use? (Each correct answer presents a complete solution. Choose two.)

正解:A、B 解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
You develop an HTML application that calls a web service to retrieve JSON data. The web service contains one method named GetFullName that returns an Object named data. The data object contains two properties named GivenName and Surname.
You need to load data from the web service to the webpage.
How should you complete the relevant code? (To answer, drag the appropriate code segment or code segments to the correct location or locations in the answer area. Use only code segments that apply.)
正解:

Explanation

You can access object properties in two ways:
objectName.propertyName
or
objectName[propertyName]
Reference: JavaScript Objects
You are creating a function named getText().
The function must retrieve information from text files that are stored on a web server.
You need to develop the function to meet the requirement.
Which code segment or segments should you use? (To answer, drag the appropriate command from the list of commands to the correct location or locations in the work 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

* onreadystatechange
When a request to a server is sent, we want to perform some actions based on the response.
The onreadystatechange event is triggered every time the readyState changes.
The readyState property holds the status of the XMLHttpRequest.
Example
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
}
}
* Send a Request To a Server
To send a request to a server, we use the open() and send() methods of the XMLHttpRequest object:
xmlhttp.open("GET","xmlhttp_info.txt",true);
xmlhttp.send();
Reference: AJAX - The onreadystatechange Event; The XMLHttpRequest Object
You are developing an application in HTML5.
The application contains the following HTML markup.

You need to ensure that all of the links referencing domain names ending in.org are diaplayed in red text.
What should you do?

You are developing application web form by using HTML5 and JavaScript.
You need to prevent users from submitting form data more than once.
Which code segment should you use?

解説: (JPNTest メンバーにのみ表示されます)
You are developing a website that helps users locate restaurants in their area from a browser. You created a function named findRestaurants().
The function must:
- Get the current latitude and longitude of the user's device
- Pass the user's location to findRestaurants()
You must ensure that the application accesses the geolocation information from the device before searching for restaurants.
Which code segment should you use?

解説: (JPNTest メンバーにのみ表示されます)

弊社を連絡する

我々は12時間以内ですべてのお問い合わせを答えます。

オンラインサポート時間:( UTC+9 ) 9:00-24:00
月曜日から土曜日まで

サポート:現在連絡