带有两个提交按钮的表单(带有不同的 action)

xiaoxiao2021-02-28  96

这里我们要掌握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

最新回复(0)