What’s the function of setRequestHeader() method in XMLHttpRequest Object ?
Sends an HTTP request to the server.
Returns all of the HTTP headers.
Sets the name and value of an HTTP Header.
Opens a request to the server.
AJAX uses --------------- for information Exchange?
JavaScript
XML
MQ
Java
What is the purpose of the 3rd argument in the below command : xmlhttp.open("POST", url, true)
Append the contents of the Text file.
Append the contents of the XML File.
Data will be processed asynchronously.
Data will be process Synchronously.
What’s the property to get the return value from Server in JavaScript?
xmlHttp.responseBody
xmlHttp.readyState.
xmlHttp.statusText.
xmlHttp.responseText.
How to create an Array in JavaScript?
Var x = new Array(50);
Var x = new Array[50];
Var x = Array(50);
Var x = Array[50];
Does JavaScript Function allow to return value ?
True
False
Using JavaScript Fucntion need to set Date to 5 days into the Future. Select the Correction option?
Var myDate = new Date(); myDate.setDate(myDate.getDate()+5);
Var myDate = new Date(); myDate.setDate(myDate.getDate()-5);
Var myDate = new Date(); myDate.setDate(5);
None of the above.
JavaScript Function to find SquareRoot?
Var y = Math.sqrt(16);
Var x = Maths.sqrt(16);
Var z = Math.squareroot(16);
Var y = Maths.squareroot(16);
Output of the below Regular Expression function in JavaScript Var patt1 = new RegExp(“Best”); document.write(patt1.test(“The Best things in life are free”));
Best.
True.
The Best things in life are free.
Best things in life are free.
JavaScript Function to find the position of a Character in a String Variable? Var x = “[email protected]”;
var atpos = x.charAt(0);
var atpos = x.charAt(‘A’);
var atpos = x.indexOf(“@”);
var atpos = x.indexOf(‘@’);