Microsoft Programming in HTML5 with JavaScript and CSS3 (70-480日本語版) - 70-480日本語 Exam Practice Test


Correct Answer:

Explanation

* accepts : 'application/bint, text/xml'
accepts:'application/bin,text/xml' to accept only XML and binary content in HTML responses.
* Use the following condition to check if the html response content is
binary: If(request.getResponseHeader("Content-Type")=="application/bint"
* var request = $.ajax({
uri:'/',
accepts: 'application/bint, text/xml',
datafilter: function(data,type){
if(request.getResponseHeader("Content-Type")=="application/bint")
return parseBint(data);
else
return parseXml();
},
success: function (data) {
start(data);
}
});

Correct Answer: A,B,D,E
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).


Correct Answer:

Explanation

You can access object properties in two ways:
objectName.propertyName
or
objectName[propertyName]
Reference: JavaScript Objects



Correct Answer: C
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).



Correct Answer:

Explanation

When readyState is 4 and status is 200, the response is ready:
Example
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
}
}
Note:
* readyState == 4
Holds the status of the XMLHttpRequest. Changes from 0 to 4:
0: request not initialized
1: server connection established
2: request received
3: processing request
4: request finished and response is ready
* status==200
200: "OK"
404: Page not found
Reference: AJAX - The onreadystatechange Event

Correct Answer: C
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).


Correct Answer:

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

Correct Answer: B
Vote an answer
Explanation: Only visible for Fast2test members. You can sign-up / login (it's free).










