用new option添加的选项,怎么取到它的值? document.form1.beginM.options[document.form1.beginM.selectedIndex].text 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 楼上的,应该是value吧document.form1.beginM.options[document.form1.beginM.selectedIndex].value 可以试试这样添加var obj=document.getElementById("Select1");var option=document.createElement("option");option.text="中国";option.value="zh";obj.add(option);添加完成后应该是这样 <select id="Select2"> <option selected="selected" value="zh">中国</option> </select> js jQuery 事件绑定问题 js的释放内存方法是什么啊 如何利用脚本判断一个页面是否获得了焦点 [急]不用ID能不能innerHTML? 真心求师傅 很喜欢技术 想找人带带 能不能通过窗口名字得到该窗口的引用? 使用Wscript.Shell如何去掉系统提示 高分求一脚本做的HTML编辑器。 怎么传递参数? 孟子章,有事请教 旧题重新问过(用js读取本地excel到html) 推荐一本事例比较多的书吧,JS的
document.form1.beginM.options[document.form1.beginM.selectedIndex].value
var obj=document.getElementById("Select1");var option=document.createElement("option");
option.text="中国";
option.value="zh";obj.add(option);添加完成后应该是这样
<select id="Select2">
<option selected="selected" value="zh">中国</option>
</select>