HTML 5 <button> formaction 屬性
實(shí)例
帶有兩個(gè)提交按鈕的表單(帶有不同的 action):
<form action="demo_form.asp" method="get">
First name: <input type="text" name="fname" />
Last name: <input type="text" name="lname" />
<button type="submit">提交</button><br />
<button type="submit" formaction="demo_admin.asp"
>以管理員身份提交</button>
</form>
HTML 4.01 與 HTML 5 之間的差異
formaction 屬性是 HTML 5 中的新屬性。
語(yǔ)法
<button formaction="value">