获取select的值!?急! document.insert.list1.options[document.insert.list1.selectedindex].value 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 对不起,document.insert.list1.options[document.insert.list1.selectedIndex].valueselectedindex中"i"应该大写 <form name="insert"><select name="list1"><option value="1">item1<option value="2">item2</select></form>可以直接这样子取值.<input type=button onclick="alert(document.insert.list1.value)"> 2.<form name="insert"><select name="list1"><option value="1">item1<option value="2">item2</select></form><input type=button onclick="alert(document.insert.list1.options[document.insert.list1.selectedIndex].value)" value="get"> 刚开始大家是怎么学JS的 帮忙查看错误 将A页面的内容嵌入到B页面,如何用jsp实现?如何用html+javascript实现? 哪位高手帮我看一下下面这段代码!! onSubmit="goTo();return false"啥意思,和一些小问题 用xmldom读取变量转化成XML,然后再取节点 在网页上怎么实现像richtextbox这样的输入 应该不太难:请问怎样通过回车提交指定的文本框的内容 如果用JS实现实时编辑效果? 这种JSON怎么遍历,each嵌套了还是弄不出 用正则表达式怎么确定textbox里面是一个有效的文件名???谢谢。 高分求教打印网页如何不把打印按钮打印出来
document.insert.list1.options[document.insert.list1.selectedIndex].valueselectedindex中"i"应该大写
<select name="list1">
<option value="1">item1
<option value="2">item2
</select>
</form>
可以直接这样子取值.
<input type=button onclick="alert(document.insert.list1.value)">
<select name="list1">
<option value="1">item1
<option value="2">item2
</select>
</form>
<input type=button onclick="alert(document.insert.list1.options[document.insert.list1.selectedIndex].value)" value="get">