XMLHttpRequest Question:
Download Job Interview Questions and Answers PDF
How do we pass parameters to the server?
Answer:
Below are the two ways of passing data to server. The first one shows by using GET and the second by POST.
xmlHttpObj.open("GET","http://" + location.host +
"/XmlHttpExample1/WebForm1.aspx?value=123", true);
xmlHttpObj.open("POST","http://" + location.host +
"/XmlHttpExample1/WebForm1.aspx?value=123", true);
xmlHttpObj.open("GET","http://" + location.host +
"/XmlHttpExample1/WebForm1.aspx?value=123", true);
xmlHttpObj.open("POST","http://" + location.host +
"/XmlHttpExample1/WebForm1.aspx?value=123", true);
Download XHR2 Interview Questions And Answers
PDF
Previous Question | Next Question |
Explain setRequestHeader("label", "value")? | Explain the purpose of each of the HTTP request types when used with a RESTful web service? |