form表单如下:
<form id="my_form" method="get" action=""> <input type="hidden" name="action" value="show" /> <select onchange="submitForm();" name="kind" style="background:#fff;border:1px solid #ccc;"> <option value="all"></option> <option value="all">默认全部</option> <option value="1">文字广告</option> <option value="2">头部广告690x80</option> <option value="3">侧栏广告270x200</option> </select> </form>
js代码:
//select单击提交表单 function submitForm(){ var form = document.getElementById("my_form");//获取form表单对象 form.submit();//form表单提交 }
效果:http://localhost:8082/CMS1/admin/adver.php?action=show&kind=2
另:js也jQuery操作select
http://www.jb51.net/article/42523.htm