Sunday, June 10, 2012

jQuery: Basic Questions



1.       What is jQuery?
A
JavaScript Library
C
SQL Library
B
Java Library
D
None of the above

2.       How can elements on a web page be selected in jQuery?
A
$(“#ELEMENTID”)
C
 $(“TAG”)
B
$(“.CSSCLASSNAME”)
D
All of the above

3.       How to get the value of an element by Id?
A
$(“#ELEMENTID”).val()
C
$(“#ELEMENTID”).value()
B
$(“#ELEMENTID”).eval()
D
$(“#ELEMENTID”).find().val()

4.       How to read a file available in web server?
A
$.read(“FILENAME”)
C
$.get(“FILENAME”)
B
$.read(“FILENAME”).get()
D
None of the above

5.       What is the jQuery equivalent for window.onload() event?
A
$.document.onload()
C
$.document.ready()
B
$.document.onready()
D
None of the above

6.       How to pass parameters to an explicit function in callback event?
A
callback: function(arg1,arg2,…){}
C
None of the above
B
callback: function()
{
  functionname(arg1, arg2)
}



7.       Which option can be used to modify the display of a group of radio buttons?
A
.button()
C
.buttonset()
B
.radiobutton()
D
None of the above

8.       Can we expand more than one item description using accordion control?
A
YES
C
NO





9.       How to create an object in JavaScript?
A
var objName = new functionname();
C
var objName = new classname();
B
var new objName = functionname();
d
var objName = classname();

  10.   Complete the following code to make the autocomplete textbox functional;

<html>
<head>
<script language="javascript"
        type="text/javascript">
      var arrStates = new Array("Andhra Pradesh","Karnataka","Kerala","Tamil Nadu");
                             
      //Complete the following line
      $(document).ready(function()
                        {
                                                                    
                        });
script>
head>
<body>
       <input type="text" id="txtStates" name="txtStates" value="" />
body>
html>

1 comment:

Please leave your comments here...