87,910
社区成员
发帖
与我相关
我的任务
分享
<script>
function GaiBian(osel){
alert(osel.options[osel.selectedIndex].text);
}
function SetIndex(v){
var s=document.getElementById('selectSS');
s.selectedIndex=v;
if(s.onchange)s.onchange();//=============
}
</script>
<body>
<select name='selectSS'id="selectSS" onChange="GaiBian(this)">
<option value='1'>1 </option>
<option value='2'>2 </option>
<option value='3'>3 </option>
</select> <br />
<a href="#" onclick="SetIndex(1)">change</a>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<script language="JavaScript">
<!--
function GaiBian(osel){
alert(osel.options[osel.selectedIndex].text);
}
//-->
</script>
</head>
<body>
<select name='selectSS' onChange="GaiBian(this)">
<option value='1'>1 </option>
<option value='2'>2 </option>
<option value='3'>3 </option>
</select>
</body>
</html>