070-480 無料問題集「Microsoft Programming in HTML5 with JavaScript and CSS3」
You are developing an HTML5 web application that will display encyclopedia entries.
Each encyclopedia entry has an associated image that is referred to in the entry.
You need to display the image by using the correct semantic markup.
What should you do? (To answer, drag the appropriate HTML tag to the correct element. Each tag 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.)

Each encyclopedia entry has an associated image that is referred to in the entry.
You need to display the image by using the correct semantic markup.
What should you do? (To answer, drag the appropriate HTML tag to the correct element. Each tag 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 <figure> element
The <figure> element is intended to be used in conjunction with the <figcaption> element to mark up diagrams, illustrations, photos, and code examples (among other things).
Example:
<figure>
<img src="/macaque.jpg" alt="Macaque in the trees">
<figcaption>A cheeky macaque, Lower Kintaganban River, Borneo. Original by <a href="
http://www.flickr.com/photos/rclark/
</figure>
Reference: The figure & figcaption elements
You develop the following code:

You need to complete the code to meet the following requirements:
How should you compete the code? To answer, drag the appropriate code elements to the correct targets in the answer area. 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.


You need to complete the code to meet the following requirements:
How should you compete the code? To answer, drag the appropriate code elements to the correct targets in the answer area. 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.

正解:

Explanation

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.)


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 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.)
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.)
正解:A、C
解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
You are developing an HTML5 page. The page includes the following code.

The inner paragraph must be exactly 15 pixels from the top left corner of the outer paragraph. You set the left style for the inner paragraph to the appropriate value.
You need to set the position property of the inner paragraph.
Which value should you use?

The inner paragraph must be exactly 15 pixels from the top left corner of the outer paragraph. You set the left style for the inner paragraph to the appropriate value.
You need to set the position property of the inner paragraph.
Which value should you use?
正解:A
解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
You have the following markup.

For each of the following statements, select Yes if the statement is true. Otherwise, select False.
NOTE: Each correct selection is worth one point.


For each of the following statements, select Yes if the statement is true. Otherwise, select False.
NOTE: Each correct selection is worth one point.

正解:

Explanation

You have the following HTML markup within a page that lists the sessions of a conference. (Line numbers are included for reference only.)

You need to use HTML5 to maximize Search Enginer Optimization (SEO) for the page.
Which two changes should you make to the markup? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.

You need to use HTML5 to maximize Search Enginer Optimization (SEO) for the page.
Which two changes should you make to the markup? Each correct answer presents part of the solution.
NOTE: Each correct selection is worth one point.
正解:B、F
解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
You have the following code:

The web service returns a JSON object that contains two properties named Description and FileName.
The PersonImage object must meet the following requirements:
* Create an object that represents an image that will be displayed.
* Set the image properties from the values that are returned by the web service.
* Expose the image as a property of the PersonImage object.
You need to insert code at line 13 to complete the implementation of the PersonImage object.
Which three actions should you perform in sequence to complete the implementation? (Develop the solution by selecting the required code segments and arranging them in the correct order.)


The web service returns a JSON object that contains two properties named Description and FileName.
The PersonImage object must meet the following requirements:
* Create an object that represents an image that will be displayed.
* Set the image properties from the values that are returned by the web service.
* Expose the image as a property of the PersonImage object.
You need to insert code at line 13 to complete the implementation of the PersonImage object.
Which three actions should you perform in sequence to complete the implementation? (Develop the solution by selecting the required code segments and arranging them in the correct order.)

正解:

Explanation
Box 1: var img = document.createElement('img');
Box 2: img:alt = image.Description;
img src = image.FileName;
Box 3: return this.img;
Note:
* Image Object
The Image object represents an embedded image.
For each <img> tag in an HTML document, an Image object is created.
Notice that images are not technically inserted into an HTML page, images are linked to HTML pages. The
<img> tag creates a holding space for the referenced image.
* Image Object Properties include
alt, Sets or returns the value of the alt attribute of an image
src, Sets or returns the value of the src attribute of an image



