Prasad Bolla's SharePoint Blog

Click Here to go through the Interesting posts within my Blog.

Click Here to go through the new posts in my blog.

Thursday, November 29, 2012

How to select a particular value or text with in a Dropdownlist using JQuery


HTML Select Value Example:-
$('select#ddlCategory').val("3");
Note:- Here I am selecting the option which contains 3.
HTML Select Text Example:-
$("select#ddlCategory").find("option:contains('SharePoint 2010')").prop("selected", "selected");
Note:- Here I am selecting the option which contains SharePoint 2010

No comments:

Post a Comment