Through JS to get Select (Multiple select Drop-down) of the selected value, the specific implementation of the following, there is a need for friends can refer to, I hope to help you
Copy CodeThe code is as follows:
<! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 transitional//en" >
<title> New Document </title>
<meta name= "generator" content= "EditPlus" >
<meta name= "Author" content= "" >
<meta name= "Keywords" content= "" >
<meta name= "Description" content= "" >
<body>
<script language= "JavaScript" >
<!--
function Checkselect (objname) {
o = document.getElementById (objname);
t = document.getElementById ("Output");
var count=0;
var intvalue= "";
for (i=0;i<o.length;i++) {
if (o.options[i].selected) {
Intvalue+=o.options[i].value+ ",";
count++;
}
}
T.value=intvalue.substr (0,intvalue.length-1);
alert (count);
}
-->
</script>
<select name= "Objsel" Size=8 multiple>
<option value= "0" selected> Please select
<option value= "1" > Test One
<option value= "2" > Test II
<option value= "3" > Test three
<option value= "4" > Test four
<option value= "5" > Test Five
</select>
<input type= "button" onclick= "Checkselect (' Objsel ');" value= "Output" >
Selected items: <input type= "text" name= "Output" >
</body>