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

What is the correct jQuery code for making all div elements 100 pixels high?

2

What scripting language is jQuery written in?

3

Which jQuery function is used to prevent code from running, before the document is finished loading?

4

Which jQuery method should be used to deal with name conflicts?

5

Which jQuery method is used to switch between adding/removing one or more classes (for CSS) from selected elements?

Comments