How to set a value for an element in jQuery?

 Posted by Chvrsri on 3/28/2016 | Category: jQuery Interview questions | Views: 733 | Points: 40
Answer:

Generally in jQuery val() method is used to set the value of an attribute which is called on any <input> elements. How ever if it is called on <select> with the <option> value then the passed option would be selected.

Say if it is called on Checkbox or Radiobutton then all the matching Checkboxes and Radiobuttons would be checked.


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response