Showing posts with label select. Show all posts
Showing posts with label select. Show all posts

Wednesday, 19 February 2014

Selected option value jquery

To work with the jquery you need to take the refrence of Jquery into your HTML code like below.
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
You need to create the list box and put the option into List box.


<select name="garden" multiple="multiple" style="width: 100px; height: 200px">
        <option>Bob</option>
        <option selected="selected">Eric</option>
        <option>Danny</option>
        <option selected="selected">Arran</option>
        <option>Soni</option>
        <option>Ali</option>
        <option>Ani</option>
        <option>Rohan</option>
         <option>Ram</option>
    </select>
Full code to get the selection of option by Jquery;