0
我有一個問題,我不知道確切地在哪裏搜索或者如果之前詢問過這個問題,那麼如果是這樣,請說出來。html post form to a.php in case of button one,post form to b.php case of button two
我有一個提交給php文件的html表單。
<form name="input" action="formaction.php" method="get">
Username: <input type="text" name="user">
<input type="submit" value="Submit">
</form>
是否有可能有兩個提交按鈕,一個按鈕將發佈形式formaction.php和另一個按鈕將發佈形式anotheraction.php
<form name="input" action="html_form_action.asp" method="get">
Username: <input type="text" name="user">
<input type="submit" value="Submit to formaction">
<input type="submit2" value="Submit to anotheraction">
</form>
找到了解決辦法
來源:http://www.plus2net.com/html_tutorial/submit-two.php
<form name=f1 method=post action=test5.php>
<input type='submit' value='Open default action file test5.php' onclick="this.form.target='_blank';return true;">
<input type='submit' value='Open test6.html' onclick="f1.action='test6.php'; return true;"> </form>