How HTML5 interacts with AJAX


Q1. 
Make an Ajax request.
A. Create an XMLHttpRequest object, and call the open and send methods.
B. Use the Level 2 events, such as onload, onloadstart, and onloadend.
C. Respond to error events, or use try...catch statements.
D. Use the setRequestHeader method.
Q2. 
Use the one-off events to track request progress.
A. Create an XMLHttpRequest object, and call the open and send methods.
B. Use the Level 2 events, such as onload, onloadstart, and onloadend.
C. Respond to error events, or use try...catch statements.
D. Use the setRequestHeader method.
Q3. 
Detect and deal with errors.
A. Create an XMLHttpRequest object, and call the open and send methods.
B. Use the Level 2 events, such as onload, onloadstart, and onloadend.
C. Respond to error events, or use try...catch statements.
D. Use the setRequestHeader method.
Q4. 
Set headers for an Ajax request.
A. Create an XMLHttpRequest object, and call the open and send methods.
B. Use the Level 2 events, such as onload, onloadstart, and onloadend.
C. Respond to error events, or use try...catch statements.
D. Use the setRequestHeader method.
Q5. 
Read the headers from the server response.
A. Use the getResponseHeader and getAllResponseHeaders methods.
B. Set the Access-Control-Allow-Origin header in the server response.
C. Use the abort method.
D. Use the DOM to get individual values and concatenate them in the URL-encoded format
Q6. 
Make a cross-origin Ajax request.
A. Use the getResponseHeader and getAllResponseHeaders methods.
B. Set the Access-Control-Allow-Origin header in the server response.
C. Use the abort method.
D. Use the DOM to get individual values and concatenate them in the URL-encoded format
Q7. 
Abort a request.
A. Use the getResponseHeader and getAllResponseHeaders methods.
B. Set the Access-Control-Allow-Origin header in the server response.
C. Use the abort method.
D. Use the DOM to get individual values and concatenate them in the URL-encoded format
Q8. 
Send form data to the server
A. Use the getResponseHeader and getAllResponseHeaders methods.
B. Set the Access-Control-Allow-Origin header in the server response.
C. Use the abort method.
D. Use the DOM to get individual values and concatenate them in the URL-encoded format
Q9. 
Encode and send form data without using the DOM
A. Use a FormData object
B. Use the append method on the FormData object
C. Use the JSON.stringify method and set the content type for the request to application/json
D. Add an input element to a form whose type is file and use a FormData object
Q10. 
Send additional form values or send form data selectively
A. Use a FormData object
B. Use the append method on the FormData object
C. Use the JSON.stringify method and set the content type for the request to application/json
D. Add an input element to a form whose type is file and use a FormData object
Q11. 
Send JSON data
A. Use a FormData object
B. Use the append method on the FormData object
C. Use the JSON.stringify method and set the content type for the request to application/json
D. Add an input element to a form whose type is file and use a FormData object
Q12. 
Send a file to the server
A. Use a FormData object
B. Use the append method on the FormData object
C. Use the JSON.stringify method and set the content type for the request to application/json
D. Add an input element to a form whose type is file and use a FormData object
Q13. 
Track progress as data is uploaded to the server
A. Use the XMLHttpRequestUpload object
B. Read the responseText property
C. Use the overrideMimeType method
D. Use the responseXML property
Q14. 
Receive HTML fragments from the server
A. Use the XMLHttpRequestUpload object
B. Read the responseText property
C. Use the overrideMimeType method
D. Use the responseXML property
Q15. 
Override the MIME type sent by the server
A. Use the XMLHttpRequestUpload object
B. Read the responseText property
C. Use the overrideMimeType method
D. Use the responseXML property
Q16. 
Receive XML from the server
A. Use the XMLHttpRequestUpload object
B. Read the responseText property
C. Use the overrideMimeType method
D. Use the responseXML property
Q17. 
Receive JSON data from the server
A. Use the JSON.parse method
B. Read the responseText property
C. Use the overrideMimeType method
D. Use the responseXML property


Advertisements
Advertisements

Mail: Support@gicgac.com