代码示例:(标识:eg_html5_input_formmethod)
<!DOCTYPE HTML>
<html>
<body>

<form action="/index/demo/form_current.html" method="get">
  First name: <input type="text" name="fname" /><br />
  Last name: <input type="text" name="lname" /><br />
<input type="submit" value="提交" />
<input type="submit" formmethod="post" formaction="/index/demo/form_current.html" value="使用 POST 提交" />
</form>

</body>
</html>
运行结果: