我已经创建了一个忘记密码页面和一个更新密码页面... 如何向使用Coldfusion单击“忘记密码”按钮的用户发送更新密码页面的电子邮件链接。
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>
function myFunction()
{
var newpassword=document.getElementById("newpassword").value;
var confirmpassword =document.getElementById("confirmpassword").value;
if(newpassword==confirmpassword)
{
return true;
}
else
{
alert("Confirm password is not same as your new password.");
return false;
}
}
</script>
//This is forgot password page
<body>
<script>
function chkValues()
{
if(document.getElementById('emailid').value == '')
{
alert("Please enter emailid");
return false;
}
alert('hi, Password sent');
alert(document.getElementById('emailid').value);
return false;
}
</script>
</head>
<body>
<div class="Forgot password">
<div class="form">
<form class="forgot password">
<input type="text" placeholder="emailid" name="emailid" id="emailid" value=""/>
<br>
<button onClick="javascript:chkValues();">Login</button>
</form>
<a href ="Login.cfml"> Go Back to login</a>
</body>
<form name="updatepassword" id="updatepassword" method="post" action="updatepassword.cfml">
<div class="updatepassword" style="display:;">
<tr>
<td>
New Password
</td>
<input type="text" placeholder="New Password" name="newpassword" id="newpassword" value="" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters">
</tr>
<tr>
<td>
Confirm Password
</td>
<input type="text" placeholder="confirm Password" name="confirmpassword" id="confirmpassword" value="">
</tr>
<br>
<input type="submit" name="updatepassword" value="updatepassword" onClick="javascript:return myFunction();"/>
<cfoutput>
<cfif isDefined('URL.username')>
<input type="hidden" name="username" id="username" value="#URL.username#">
<cfelseif isDefined('form.username')>
<input type="hidden" name="username" id="username" value="#form.username#">
</cfif>
</cfoutput>
</div>
</form>
我已经创建了一个忘记密码页面和一个更新密码页面... 如何向使用Coldfusion单击“忘记密码”按钮的用户发送更新密码页面的电子邮件链接。