Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

html select specify deafult select by js variable

$(function() {
    var temp="a"; 
    $("#MySelect").val(temp);
});

<select name="MySelect" id="MySelect">
    <option value="a">a</option>
    <option value="b">b</option>
    <option value="c">c</option>
</select>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #html #select #deafult #select #js #variable
ADD COMMENT
Topic
Name
8+2 =