About AJAX

Following are some of the multiple choice questions on the AJAX with answers that will help the students in developing their knowledge.


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

  • $("p").manipulate("background-color","red");
  • $("p").style("background-color","red");
  • $("p").layout("background-color","red");
  • $("p").css("background-color","red");

2. Which of the following is a benefit of using a web service?

  • Web services allows you to expose the functionality of your existing code over the network. Once it is exposed on the network, other application can use the functionality of your program.
  • Web services allow various applications to talk to each other and share data and services among themselves.
  • Web services use standardized industry standard protocol for the communication.
  • All of the above.

3. Which directory of web service interface described by WSDL?

  • HTTP
  • DNS
  • UDDI
  • XML

4. SOAP is a format for sending messages and is also called as __________.

  • Data Transfer protocol
  • Communication protocol
  • Network protocol
  • None of these

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

  • $("div").height="100"
  • $("div").height(100)
  • $("div").yPos(100)
  • none of the above

6. A PHP program will display the name of the month when entering a number between 1 and 12 in the input form. The use of the right branching is ...

  • IF
  • IF ... ELSE
  • IF - IF .. ELSE - ELSE

7. Which of the following AJAX property will help us to read the response from the server?

  • responseText
  • readResponseText
  • getResponseText
  • readResponse

8. How many ready states are available in AJAX?

  • 1
  • 2
  • 3
  • 4

9. Which of the following is true about depends attribute?

  • depends attribute can have a comma separated list of all targets that this target depends on.
  • It is an optional attribute.
  • Both A & B
  • None of the above

10. Which of the following task / tag is used to create a jar file?

  • <jar>
  • <jar-create>
  • <archive>
  • None of the above

11. Which of the following will used to call a target form another target in ANT?

  • <antcall> Tag
  • depends attribute in a <target> Tag
  • Both A & B
  • None of the above

12. Which of the following technology is not used by Ajax?

  • JavaScript
  • Document Object Model
  • XMLHttpRequest
  • Flash

13. WSDL Stands for ________

  • Web Services Development Language
  • b) Web Services Design Language
  • None of these
  • Web Services Description Language

14. SOAP based on

  • HTML
  • WML
  • XML
  • CSS

15. UDDI Stands for

  • Universal Development, Design and Integration
  • Universal Description, Discovery and Integration
  • Universal Description, Development and Integration
  • None of these

16. How do we keep data inside an Object ?

  • Key : value
  • key = value
  • value : key
  • key = value

17. Which of the following is the true regarding prototype

  • We can add new properties at later stage to a function which will be shared across all the instances
  • The prototype is an object
  • Prototype is associated with every functions and objects by default
  • All the Options

18. What is exception Handling ?

  • Error Handling
  • Options Handling

19. Which of the following is false about AJAX ?

  • AJAX IS Asystematic Javascript and XML
  • Update a web page without reloading the page
  • Request and Recieve data from a server - after the page has loaded
  • Send data to a server - in the background

20. Which of the following is a use case of AJAX ?

  • Google Maps : A user can drag an entire map by using the mouse, rather than clicking on a button.
  • Google Suggest : As you type, Google offers suggestions. Use the arrow keys to navigate the results.
  • Chat room and messaging
  • All the options

21. If a condition has two choices, namely true and false, then the syntax used is ...

  • IF
  • IF ... ELSE
  • IF - IF .. ELSE - ELSE

22. Which of the following task / tag is used to delete a directory in ANT?

  • <rm>
  • <rmdir>
  • <remove>
  • <delete>

23. Which is an AJAX function?

  • can load data from the server to a web browser without reloading (refreshing)
  • make code more concise
  • add style to the web page
  • create slide animations

24. The function in JQuery that is used to ensure all the desired elements are displayed on the web page is ...

  • document ready()
  • document complete()
  • document all()
  • document display()

25. The functions provided by JQuery to hide elements are ...

  • fadeSlow
  • fadeIn
  • fadeToggle
  • fadeOut

26. Which operator is used to calculate the modulo?

  • *
  • /
  • +/
  • %

27. Which is the wrong way to write variables in PHP?

  • $name
  • $_address
  • $1student
  • $school?

28. The following is not a way of writing PHP code in HTML is ...

  • <? dan ?>
  • <?php dan ?>
  • <script language=”php”> dan </script>
  • <$ dan $>

29. PHP is a server-side programming, where the code will be executed on the server side. The following which one can act as a server on a local computer ...


30. The right syntax used to stop a loop when a condition occurs and continue the next loop is ...

  • DO ... WHILE

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

  • $(body).onload()
  • $(document).load()
  • $(document).ready()
  • none of the above

32. Look at the following selector: $("div p"). What does it select?

  • The first p element inside a div element
  • All p elements inside a div element
  • All div elements with a p element
  • none of the above

33. Which jQuery method is used to hide selected elements?

  • hide()
  • hidden()
  • visible(false)
  • display(none)

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

  • All div elements with id="intro"
  • All div elements with class="intro"
  • The first div element with class="intro"
  • The first div element with id="intro"

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

  • css()
  • style()
  • html()
  • both style and css

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

  • jQuery.ajaxAsync()
  • jQuery.ajaxSetup()
  • jQuery.ajax()
  • NOTA

37. In JS we have ____________ Inheritance.

  • Prototypal
  • Classical

38. JavaScript is a/an ______________________language

  • Object-Oriented
  • Object-Based
  • Assembly-language
  • High-level

39. How can we access the members of an Objects

  • using dot operator
  • using indexes
  • using ()
  • using blank space

40. To access the variables of an Objects : its member functions use

  • dot operator
  • this operator
  • getter funtion
  • setter function

41. Same operators behaving differently in different situations is called

  • Aliasing
  • Duplicating
  • Overloading
  • none of the above

42. Which of the following is considered as Web Service Platform Elements ?

  • SOAP
  • All of these
  • UDDI
  • WSDL

43. SOAP is an

  • both platform and language independent protocol
  • only platform independent and not language independent protocol
  • only language independent and not platform independent protocol
  • neither platform independent nor language independent protocol

44. SOAP is ______________.

  • Simplified Object Arbitary Protocol
  • Secure Object Access Protocol
  • Simple Object Access Protocol
  • None of the above

45. Which of the following is correct about Service Discovery layer in Web Service Protocol Stack?

  • This layer is responsible for centralizing services into a common registry and providing easy publish/find functionality.
  • Currently, service discovery is handled via Universal Description, Discovery, and Integration (UDDI).
  • Both of the above.
  • None of the above.

46. What is the full form of AJAX ?

  • Asynchronous Javascript and XML
  • Another Java and XML Library
  • Abstract JSON and XML
  • None of the mentioned

47. What ANT stands for?

  • Anywhere Neutral Test
  • Anywhere Neutral Testsuite
  • Another Neat Tool
  • None of the above.

Enjoyed the Quiz. Share this with friends


Add Your Review

Your email address will not be published.

Subscribe to Newsletter!

Subscribe to get latest updates and information.