我试图在没有太多JS的情况下实现这一点,但不确定我是否可以做到这一点。 我有一个密码重置页面,当用户点击"完成",然后我希望该对话框消失,并替换为一个替换另一个的弹出/对话框,并说"我们已向您发送了一封电子邮件,说明如何重置密码....请检查您的电子邮件等。" *它需要在提交数据后出现。如你所见,我似乎无法做到这一点。任何想法/方向将不胜感激:
<form method="post">
<a href="#openModal"><input type="submit" name="email" value="Continue"></a>
<div id="openModal" class="modalDialog">
<div><a href="#close" title="Close" class="close"></a>
<p>We have sent you an email with instructions on how to reset your password.</p>
</div>
</form>
答案 0 :(得分:1)
<!doctype html>
<html>
<head>
<script>
function sent() {
alert("We have sent you an email with instructions on how to reset your password.");
}
</script>
</head>
<body>
<form method="post">
<a href="#openModal">
<input type="submit" name="email" value="Continue" onclick="sent()">
</a>
<div id="openModal" class="modalDialog">
<div><a href="#close" title="Close" class="close"></a>
</form>
</body>
</html>