不点击submit 自动提交select表单

<form id='fm' action="pdetails2.php?pid=0" method="post">
<select id='se' name="SelectP" onchange="javascript:document.getElementById('fm').action='pdetails2.php?pid='+ document.getElementById('se').value">
<option selected="selected">Please select...</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
</select>
<input name="btn_pro" type="submit" value="Submit"/>
</form>
请问怎么修改

你这个只是下拉框值改变时把表单的action属性设置成对应的值,没有提交表单。。有两种做法:1.onchange="window.location.href='pdetails2.php?pid='+this.options[this.selectedIndex].value"
2.onsubmit
onchange = "document.getElementById('fm').action
='pdetails2.php?pid='+this.options[this.selectedIndex].value;document.getElementById('fm').onsubmit();"
手动的不容易,给个分吧!
温馨提示:答案为网友推荐,仅供参考
相似回答