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

You have a web page that contains the following markup.

You need to ensure that css1.css is used only when the current browser width is less than 800px.
Which markup should you add to the web page?

You review a webpage that contains the following markup:

How does the page render? For each statement in the table, select Yes if the behavior is described. Select No if it is not. Make only one selection in each column.
正解:

Explanation
A web application has a web page that contains an HTML5 CANVAS element. A web extracts messages from the CANVAS element. You need to ensure that the web worker can read the message sent by the web page.
Which three object types can you use?

正解:C,E,F 解答を投票する
解説: (GoShiken メンバーにのみ表示されます)
You develop an HTML5 webpage. You have the following HTML markup:

You need to add a background color to the first article in each section.
Which code segment should you add to the webpage?

解説: (GoShiken メンバーにのみ表示されます)
You develop a webpage that allows a user to download a JPEG image and convert it to a PNG file.
You need to implement the code to download the contents of the JPEG image with no additional decoding.
Which JavaScript function should you use?

解説: (GoShiken メンバーにのみ表示されます)
You are validating user input by using JavaScript and regular expressions.
A group of predefined regular expressions will validate two input fields:
* An email address in a function named validateEmail (for example, [email protected])
* A nine-digit number that allows optional hyphens after the second and fifth character in a function named validateSSN(for example, 555555555 or 555-55-5555) You need to use the correct expression to validate the input.
Which expression should you insert into each function? (To answer, drag the appropriate regular expression statement to the correct location. Each regular expression statement 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 are developing an HTML5 web application and are styling text. You need to use the text-transform CSS property.
Which value is valid for the text-transform property?

解説: (GoShiken メンバーにのみ表示されます)
You are developing an HTML5 web application and are styling text.
You need to use the text-transform CSS property.
Which value is valid for the text-transform property?

解説: (GoShiken メンバーにのみ表示されます)
You are developing an HTML5 web page.
The appearance of the text box must change when a user moves the focus to another element on the page.
You need to develop the page to respond to user action.
Which line of code should you use?

解説: (GoShiken メンバーにのみ表示されます)
You have the following markup:

You need to complete the styles to meet the following requirements:
How should you complete the styles? 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
Target 1: Flex
Target 2: 1
Target 3: Flex
Target 4: 2
https://css-tricks.com/snippets/css/a-guide-to-flexbox/
You develop an HTML5 webpage that contains the following markup and code:

You have the following requirements:
* Display a message if users select the first OPTION element, and then submit the form.
* Do not display an alert message if users select any other OPTION element, and then submit the form.
You need to implement the madeSelection() function.
How should you complete the relevant code? (To answer, select the appropriate code segment from each drop-down list in the answer area.)

正解:

Explanation

* The <select> element is used to create a drop-down list.
The <option> tags inside the <select> element define the available options in the list.
* option.value
text
Specifies the value to be sent to a server
Reference: HTML <option> Tag
You develop an HTML5 chat application.
You need to provide real-time updates to the messages that users post in the chat application.
What should you do?

解説: (GoShiken メンバーにのみ表示されます)
You develop an HTML5 application that interacts with a REST service. The REST service accepts JSON data.
A JavaScript object named form Data contains data that is sent to the REST service.
You need to convert the JavaScript object named formData into JSON.
Which code segment should you use?

You are creating a web worker for an HTML5 application.
The following tasks must be performed from within the web worker:
* Register an event listener for the web worker
* Start and stop the web worker
You need to define a function that performs the required tasks.
Which code segment should you use? (To answer, select the appropriate option from the drop-down list in the answer area.)

正解:

Explanation

* addEventListener
The addEventListener() method attaches an event handler to the specified element.
In context of a worker, both self and this refer to the global scope. The worker can either add an event listener for the message event, or it can define the onmessage handler to listen for any messages sent by the parent thread.
* postmessage
Pass a message to the worker.
* close()
Terminating Workers
Workers are resource-intensive; they are OS-level threads. Therefore, you do no want to create a large number of worker threads, and you should terminate the web worker after it completes its work. Workers can terminate themselves, like this:
self.close();
Reference: HTML DOM addEventListener() Method; The Basics of Web Workers
You are developing an application that uses a third-party JavaScript library named doWork().
The library occasionally throws an "object is null or undefined" error with an error code of
-2146823281.
The application must:
* Extract and handle the exceptions thrown by doWork()
* Continue normal program execution if other exceptions occur
You need to implement the requirements.
Which code segment should you use?

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

You need to change the background color for all of the elements whose name attribute ends with the word name.
Which code segment should you add to the webpage?

解説: (GoShiken メンバーにのみ表示されます)
You have the following markup.

You need to ensure that the yellow div is centered in the red div.
What should you do?

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 are developing an application by using JavaScript.
You must write a function that returns the sum of the variables named v1, v2, v3, v4.
You need to complete the sum function.
How should you complete the relevant code? (To answer, drag the appropriate code segment or segments to the correct location or locations in the answer area. Use only code segments that apply.)
正解:

Explanation

* What is the difference between call and apply?
apply lets you invoke the function with arguments as an array; call requires the parameters be listed explicitly.
Pseudo syntax:
theFunction.apply(valueForThis, arrayOfArgs)
theFunction.call(valueForThis, arg1, arg2, ...)
Reference: What is the difference between call and apply?