<html>
<head>
<title> Example of the option object</title>
</head>
<body>
<script language="JavaScript">
<!--
function add(myForm) {
var option0 = new Option("A", "person1");
var option1 = new Option("B", "person2");
var option2 = new Option("C", "person3");
var option3 = new Option("D", "person4");
for (var i=0; i < 4; i++) {
eval("myForm.people.options[i]=option" + i)
}
}
-->
</script>
<form>
<select name="people" multiple></select><P>
<input type="button" value="Add People" onClick="add(this.form)">
</form>
</body>
</html>
|