【发布时间】:2018-08-24 13:18:03
【问题描述】:
当我在各个字段中输入数据并单击提交按钮时,表单已提交,当我单击重新加载按钮时,它会显示以下消息“您正在查找的页面使用了您输入的信息。返回该页面可能会导致重复您执行的任何操作。要继续吗?如何防止此表单重新提交,因为单击重新加载按钮时我想刷新页面。这是 HTML 表单。
<!DOCTYPE html>
<html>
<head>
<title> Sample Page </title>
</head>
<body>
<form id="login-form" method="post">
<input type="text" id="user-name" name="Username" placeholder="USERNAME" maxlength="15" autocomplete="off"> <br> <br>
<input type="password" id="pass-word" name="Password" placeholder="PASSWORD" maxlength="10" autocomplete="off"> <br> <br>
<button id="login-button" name="login_button" type="submit"> Login </button>
</form>
</body>
</html>
【问题讨论】:
-
Preventing form resubmission 的可能副本 - 我认为该链接将包含您需要的一切。
标签: html