<form method="post" id="form" action="index.php" name="theform">
<input type="hidden" name="action" value="all" />
<input type="submit" name="submit" value="提交" onclick="this.form.action+='?op=del';">
</form>
这样写是不是有问题?我这样写的话,提交不到index.php?op=del这里,只能提交到index.php里。
是不是form里不能有一个name为action的表单?因为他们有冲突?解决方法是不是只有修改
<input type="hidden" name="action" value="all" />
这里的name值。
你直接把form的action改为index.php?op=del就行啊。
或者是这种形式index.php?op=<?=$action;?>
应该说是同一个文件但是是不同的页面。你说的那个方法不试用我。我现在的目的是要在同一个form里放置多个提交按钮,然后根据onclick不同,转向不同的接收页面。
我要实现的效果是不能简单的直接改form里的action的。