jQuery Multiple choices


Total available count: 24
Subject - JavaScript Frameworks
Subsubject - jQuery

Which jQuery method is used to perform an asynchronous HTTP request?


 

 

 

 



B


Solution:-

jQuery ajax() Method Definition and Usage
The ajax() method is used to perform an AJAX (asynchronous HTTP) request. All jQuery AJAX methods use the ajax() method. This method is mainly used for requests where the other methods cannot be used.

Syntax

$.ajax({name:value, name:value, name:value,... })

The parameters specify one or more name/value pairs for the AJAX request. The following example shows how to change the text of an <div> element using an AJAX request:

$("button").click(function(){
 $.ajax({url: "demo_test.txt", success: function(result){
 $("#div1").html(result);
 }});
});

 




Next 5 multiple choice(s)

1

Which jQuery method is used to set one or more style properties for selected elements?

2

Which jQuery method is used to hide selected elements?

3

With jQuery, look at the following selector: $("div.intro"). What does it select?

4

What is the correct jQuery code to set the background color of all p elements to red?

5

The jQuery html() method works for both HTML and XML documents

Comments