Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<html>
<head>
<script type="text/javascript">
function countOptions(obj) {
var len = obj.length;
var cnt = 0;
for (i = 0; i < len; i++) {
cnt = (obj.options[i].selected) ? cnt + 1 : cnt;
}
alert("There are " + cnt + " items selected in the dropdown");
}
</script>
</head>
<body>
<form name=blahForm>
<select name=blahSelect multiple>
<option value=0>zero
<option value=1>one
<option value=2>two
<option value=3>three
<option value=4>four
<option value=5>five
<option value=6>six
<option value=7>seven
<option value=8>eight
<option value=9>nine
</select>
<input type=button value='Click Me' onclick='countOptions(blahForm.blahSelect)'>
</form>
</body>
</html>