AJAX QUIZ DESCRIPTION Total Questions −30 00 Max Time − 15:00 Which jQuery method is used to get the all ancestor elements between two given arguments? parent() parents() parentsUntil() All of the above Which jQuery DOM method is used to get the attribute value? attr() attribute() attrib() val() Which are the jQuery methods for traversing up the DOM tree? parent() parents() parentsUntil() All of the above What makes Ajax unique? It works as a stand-alone Web-development tool. It works the same with all Web browsers. It uses C++ as its programming language. It makes data requests asynchronously. Write a jQuery statement to remove all <pre> elements with class="prog" and class="old"? $(".prog#old").remove(); $("pre").empty(".prog",".old"); $("pre").remove(".prog, .old"); $("pre.prog.old").remove(); Which of the following is not a valid JavaScript variable name? 21abc abc21 _abc None of above Can we add more than one CSS classes to the selected elements using the addClass() method? Yes No Which is the correct syntax to insert content before the <div> elements? $("div").before("Text to be added"); $("div").pretpend("Text to be added"); $("div").addbefore("Text to be added"); $("#div").before("Text to be added"); Which is the correct syntax to insert content at the beginning of the <p> elements? $("#p").before("Text to be added"); $("p").addafter("Text to be added"); $("p").after("Text to be added"); $("p").prepend("Text to be added"); Determine whether the following line is correct or not: With AJAX it is possible to work on an image on the client. Yes No The XMLHttpRequest object can be disabled via browser settings. True False What will the following jQuery code do? $(document).ready(function(){ $("pre").siblings(); }); It will return all parent elements of <pre> element It will return all children elements of <pre> element It will return all sibling elements of <pre> element It will return all nonrelative elements of <pre> element Regarding the XMLHttpRequest Object, does the order in which one calls the “open” method and assign a function to the “onreadystatechange” event handler matter? yes No Which method is used to remove CSS class to the selected elements? removeCSS() removeClass() removeClasseses() RemoveClass() _____ JavaScript statements embedded in an HTML page can respond to user events such as mouse-clicks, form input, and page navigation. Client-side Server-side Local Native Uninitialized state of XMLHttpRequest object refers to the state when the object has not been initialized. True False WebCrawler does not execute JavaScript code,so you should not use AJAX in commercial sites. True False What is AJAX ? is a programe is a country name is a football club name In Internet Explorer, from the following, which one is the right option to obtain XMLHttpRequest object? if (window.XMLHttpRequest) { httpReq = new XMLHttpRequest(); } if (window.ActiveXObject) { httpReq = new ActiveXObject(“Microsoft.XMLHTTP”); } if (window.ActiveXObject) { httpReq = new GetObject(“Microsoft XMLHTTPRequest”); } if (window.XMLHttpRequest) { httpReq = new XMLHttpRequest(“IE”); } Which jQuery methods are used to get or set the width and height of an HTML element including the paddings and borders? outerWidth() and outerHeight() width() and height() cssWidth() and cssHeight() elementWidth() and elementHeight() There is a <pre> element, write a jQuery statement to get it's parent? $("pre").parent(); $("pre").parents(); $("pre").parentsUntil(); None of the above Which are the jQuery methods for traversing down the DOM tree? children() find() childrens() Both A. and B. Which jQuery method is used to get or set the height of an HTML element? cssHeight() CssHeight() height() getHeight() AJAX Stands for: Asynchronous Javascript and XML Abstract JSON and XML Another Java Abstraction for X-Windows Another Java and XML Library Choose the server-side JavaScript object? FileUpLoad Function File Date Fill in the blank with the proper option from the following: A ________________________ to the JavaScript engine starts all subsequent requests to the server. XML Document Function call HTML page XHTML Tag Which is the correct syntax to get the value of a CSS style attribute/property using the css() method? css("propertyname"); css(propertyname); css(".propertyname"); css("#propertyname"); Which is the correct jQuery statement to get the value "href" attribute having id "top"? $("top").attr("href") $(".top").attr("href") $("$top").attr("href") $("#top").attr("href") Ajax stands for Synchronous JavaScript and XML. True False What does the XMLHttpRequest object accomplish in Ajax? It’s the programming language used to develop Ajax applications. It provides a means of exchanging structured data between the Web server and client. It provides the ability to asynchronously exchange data between Web browsers and a Web server. It provides the ability to mark up and style the display of Web-page text. Previous Next Total Question16 Wrong Answer13 Right Answer13