<html>
<body>
<select id="osel">
</select>
<script language="javascript" type="text/javascript">
<!--
var osel = document.getElementById("osel");
// var newarr = [
// ['A', 'B'],
// ['C', 'D'],
// ['E', 'F']
// ];
var item = new Array();
for (var i = 0; i < 10; i++) {
item[i] = i + 1;
}
for (var i = 0; i < item.length; i++) {
osel.options.add(new Option(item[i], i))
}
//-->
</script>
<script language="javascript" type="text/javascript">
function test() {
var osel = document.getElementById("osel");
alert(osel.selectedIndex);
alert(osel.options[osel.selectedIndex].text);
alert(osel.options[osel.selectedIndex].value);
}
</script>
<input id="Button1" type="button" value="button" onclick="test();" />
</body>
</html>