document.forms[0].elements["selectname"]
解决方案 »
- 在html中怎么执行这个js函数
- 我用document.getElementById()取得一个对象,我怎么知道它是什么标签呢?比如<a>或者<select>?
- 请教如何实现这样一个拖动的功能
- 如何动态取得frame的src值?
- 请问如何让表格部分滚动,在线等
- 这是一个弹出窗口关闭原窗口的代码,怎么可以让弹出的窗口最大化?不是fullscreen!
- 运行javascript的程序对ie的版本有要求马?
- 怎样改变IE滚动条的颜色?
- 求救:JScript中如何对数字四舍五入到小数点后第n位?
- DOM编程艺术综合示例-增强表单中的问题
- 请问怎么做出这样的效果?http://www.takungpao.com/
- javascript超难问题。。键盘事件和highlight问题!!
应该怎么写呢?
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head><body><form method="POST" action="--WEBBOT-SELF--">
<p><select size="1">
<option>A1</option>
<option>A2</option>
</select><select size="1">
<option>B1</option>
<option>B2</option>
</select><select size="1">
<option>C1</option>
<option>C2</option>
</select></p>
</form></body>
<SCRIPT language=javascript>
alert(document.forms[0].elements[0].options[document.forms[0].elements[0].selectedIndex].text)
alert(document.forms[0].elements[1].options[document.forms[0].elements[1].selectedIndex].text)
alert(document.forms[0].elements[2].options[document.forms[0].elements[2].selectedIndex].text)
</SCRIPT>
</html>