JS之SELECT的VALUE作为BUTTON提交的参数

来源:互联网 发布:大学生网络课程答案 编辑:程序博客网 时间:2024/06/06 08:28

<!DOCTYPE html><html><head><script language="javascript">function aa(v){ document.getElementById('hidden').value=v}function bb(){ var txt=document.getElementById('hidden').value; location.href='./xx.php?tid='+txt;}</script><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>请选择测试项目</title></head><body><select name="test" id="test" onChange="aa(this.value)">   <option value="">请选择测试项目</option>   <option value="1">1</option>   <option value="2">2</option>   </select><input id="hidden" type="hidden"><input name="confirm" onclick="bb();" type="button"  value="确 定" /></body></html> 


1 0
原创粉丝点击