我的一个form中有两个按钮,然后我想单击他们分别提交到不同的后台,所以用了个js:
<script>
/////////////////////////////
function xiu(){
document.weihu.action="../php/weihu.php";
document.weihu.submit();
}
function delete(){
document.weihu.action="../php/delete.php";
document.weihu.submit();
}
</script>
html:
<form name="weihu" method="post" action="?" id="weihu">
<input name="Submit3" type="button" class="button" value="修改" onclick="xiu()" />
<input name="Submit22" type="button" class="button" value="删除" onclick="delete()"/>
我之前在另一个页面也是照这个格式写的,点击按钮都正常提交,但这个页面点击两个button死活没有反应,
求各位大哥解救!
delete
是关键字啊,这玩意会报错吧。