Get values of multiselect box using jquery

I am using multi-select dropdown and trying to fetch the values in jquery.

Please help.

the jquery documentation at .val() – jQuery API demonstrates it nicely. Essentially

var multipleValues = $("#multiple").val() || [];

$(“select”).change(function () {
var str = “”;
$(“select option:selected”).each(function () {
str += $(this).text() + " ";

you can also do it fairly easily without jquery.

<select name="mySel"  multiple="multiple">
          <option value="val1">option 1</option>
          <option value="val2">option 2</option>
          <option value="val3">option 3</option>
          <option value="val4">option 4</option>
<button type="button" onclick="showSelectsd();">Show selected values</button>

<script  type="text/javascript">

function showSelectsd(){
    var selO = document.getElementsByName('mySel')[0];
    var selValues = [];
    for(i=0; i < selO.length; i++){