how to show selected value in html select from database using jquery -


i have html select has multiple select option enabled.i want to show values selected in database.

eg : database values 2009 or 2009,2010 or 2009,2010,2012..i mean may contain ',' or may not..

and html select is

<select id="year_selected" tabindex="14" name="year_selected" multiple="multiple"> <option>2009</option> <option>2010</option> <option>2011</option> <option>2012</option> </select> 

how do jquery

on options selected add html attribute selected , should in business.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -