SELECT菜单,为什么REQUEST.FORM后,获取到的,有时候是VALUE值,可有时候却是OPTION之间的文本呢

来源:百度知道 编辑:UC知道 时间:2024/05/25 01:15:37
我用 <input name="button" type="button" class="butt" onClick="ce()" value="提交">
<input name="Submit" type="reset" class="butt" value="还原">
<script>//alert(document.form2.a.length)
function ce(){

document.form1.action=('proexe.asp?hod=new&xi='+document.getElementById('xi').options[document.getElementById('xi').selectedIndex].innerText+'&pai='+document.getElementById('pai').options[document.getElementById('pai').selectedIndex].innerText+'&pai2='+document.getElementById('pai2').options[document.getElementById('pai2').selectedIndex].innerText+'&three='+document.getElementById('three').options[document.getElementById('three').selectedIndex].innerText+'&race='+document.getElementById('race').options[document.getElementById(

Request.Form("da") 都是 VALUE 值。

只是 SELECT 里的 OPTION ,如果不指定 VALUE,VALUE 默认就是 OPTION 之间的 文本了。

例如:
<select><option value="1">A</option></select> 这个 value 是 1
<select><option>A</option></select> 这个 value 是 A