InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Write code to get browser name |
|
Answer» Below is the code to GET the browser name here i have USED if else to find the browser |
|
| 2. |
What are Selectors in jQuery mean and its syntax |
|
Answer» When we have to WORK with any control on a web page we need first to find the control. For that we USE document.getElementByID or document.getElementByName. But in jquery we do it using SELECTORS. Using this selectors we can select all the controls as well using a symbol (* ) .Below is the syntax for the same:- |
|
| 3. |
Disable or stop cut copy paste on texbox using jQuery |
|
Answer» Below is code which stop user to cut copy and paste data in textbox USING jquery.Becasue it will be better if we do not allow users to copy paste the data entered in Email and Confirm Email FIELD in order to make the user to type themselves. |
|
| 4. |
How to get current url from jQuery |
|
Answer» To get the current URL from jquery we NEED to write the below syntax. |
|
| 5. |
Can we add or change text in span tag with the help of jQuery? |
|
Answer» Can we ADD or CHANGE text in span tag with the HELP of JQUERY? |
|
| 6. |
JQuery code to search some sepecific data from dropdownlist and select if found in JQuery? |
|
Answer» JQuery code to search some sepecific data from DROPDOWNLIST and select if FOUND in JQuery? |
|
| 7. |
Difference between length and size in jQuery? |
|
Answer» Difference between length and size in jQuery? |
|
| 8. |
Write code in jQuery to create back button |
|
Answer» Below is the code to go back to LAST visited page in the browser |
|
| 9. |
Which jQuery method should be used to deal with name conflicts? |
|
Answer» Which jQuery method should be used to deal with name CONFLICTS? |
|
| 10. |
What is significance of jQuery.NoConflict |
|
Answer» If we are referring any other script files along with jQuery you may get CONFLICTS in the namespace. Some times if we use jQuery with any other libraries, we may get clash between two libraries and we encounter situations like NEITHER of the functionality works. |
|
| 11. |
What is jQuery Connect and where to use it |
|
Answer» This is a jQuery plugin that is used to connect / bind a function to another function. It is more of assigning a handler for another function. Connect is used to execute a function whenever a function from another OBJECT or plugin is executed. We can connect to an event of a DOM element too using this function. In the sense same connect function can be used for both DOM ELEMENTS and for the functions. |
|
| 12. |
Write down the query to validate Pan Number |
|
Answer» Below query is the JQUERY which help us to validate the PAN number wheather it is correct or not |
|
| 13. |
Write a example for jquery.grep method run on json array |
|
Answer» WRITE a example for jquery.grep method RUN on JSON array Below is the example for jquery.grep method which APPLY filter on the json array var dataarray = { "itemval": [{ "id": 1, "category": "option1" }, { "id": 2, "category": "option2" }, { "id": 3, "category": "option1" }] }; var returnedvalue = $.grep(dataarray.itemval, function (element, index) { return element.id == 1; }); alert(returnedvalue[0].id + " " + returnedvalue[0].category); |
|
| 14. |
How to show and hide DIV tag with the help of jQuery |
|
Answer» Below is the code for show and hide the DIV tag by using jquery |
|
| 15. |
validation in jQuery to get only alphabets in textbox |
|
Answer» Below code will helps to APPLY validation on textbox which only accept ALPHABETS not any numeric or special character |
|
| 16. |
JQuery code to empty div tag values |
|
Answer» Below is the TWO line code to empty the div tag text value here below is the JQUERY function |
|
| 17. |
What are the Functions in jquery and its type |
|
Answer» The FUNCTION in JavaScript are of two type either named or anonymous. As the NAME suggest A named function can be defined using function KEYWORD as given below |
|
| 18. |
Can we do SlideToggle Effects in jQuery |
|
Answer» Yes we can do slidetoggle effects in JQUERY and METHOD of this is given below |
|
| 19. |
Write code to disable cut copy and paste |
|
Answer» Below is the code to disable CUT copy and paste . Here code is of jquery by simply writing the code |
|
| 20. |
Code to bind dropdownlist with ng options |
|
Answer» Below is the code to bind the dropdownlist with ng OPTION here i have use case statement to bind the dropdownlist |
|
| 21. |
How to use jQuery libarary and call function from it |
|
Answer» To use jQuery we need to simple add below LINE in our HTML code file which is as below |
|
| 22. |
Code to get browser version in jQuery |
|
Answer» Below code will help us to get browser version which are we USING currently for our page |
|
| 23. |
Process of jQuery works |
|
Answer» AS all of us know $() function is an ALIAS for the jQuery() function we can also use jQUery instead of $ and this RETURNS a special Java-Script object. And this Object contains an array of DOM elements that matches the selector. And this Selector is key thing in jQuery development. It is away to select node from DOM. This Java-Script object possesses a large NUMBER of useful predefined methods that can action group of elements.This type of construct is termed a wrapper because it wraps the matching element(s) with extended functionality. |
|
| 24. |
Example of JQuery focus event on textbox |
|
Answer» Below is the example for JQuery to change COLOUR of textbox on foucs on it.First we take a html CONTROL and do jquery on it. |
|
| 25. |
Difference between body.onload and document.ready in jQuery |
|
Answer» Difference between body.onload and document.ready in jQuery |
|