源代碼
點擊運行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>教程</title> </head> <body> <form action="demo-form.asp"> First name: <input type="text" name="fname"><br> Last name: <input type="text" name="lname"><br> <input type="submit" value="提交"><br> <input type="submit" formaction="demo-admin.asp" value="提交"> </form> <p><strong>注意:</strong> Internet Explorer 9及更早 IE 版本不支持 input 標籤的 formaction 屬性。</p> </body> </html>
運行結果