这里我们要掌握h5新增的属性formaction
<!DOCTYPE HTML>
<html>
<body>
<form method="get">
First name:
<input type="text" name="fname" /><br />
Last name:
<input type="text" name="lname" /><br />
<button type="submit" formaction="/example/html5/demo_form.asp">提交
</button><br />
<button type="submit" formaction="/example/html5/demo_admin.asp">以管理员身份提交
</button>
</form>
</body>
</html>
转载请注明原文地址: https://www.6miu.com/read-27198.html