代码编辑器:
x
1
2
<meta charset="utf-8">
3
<form action="/dy/html/getpost">
4
First name: <input type="text" name="fname"><br>
5
Last name: <input type="text" name="lname"><br>
6
<input type="submit" value="提交"><br>
7
<input type="submit" formaction="/dy/json/getpost" value="提交">
8
</form>
9
<p><strong>注意:</strong> Internet Explorer 9及更早 IE 版本不支持 input 标签的 formaction 属性</p>
10