70-480日本語 無料問題集「Microsoft Programming in HTML5 with JavaScript and CSS3 (70-480日本語版)」



正解:

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);
}
});


正解:

Explanation

* contentType
contentType is the type of data you're sending.
We have to send the content-type of application/soap+xml as this is the only type that the web service allow.
* type
We post a SOAP request.
* dataType:
dataType is what you're expecting back from the server: json, html, text, xml, etc. jQuery will use this to figure out how to populate the success function's parameter.




正解:

Explanation
Box 1:

Box 2:

Box 3:

Note:
* The event object for a message event supports the following additional properties:
the data property contains the message,
the origin property retrieves the scheme, hostname and port of the document that invoked the postMessage method, the source property refers to the window object that contains the document that invoked the postMessage method, the lastEventId property returns the identifier of the last message.