Javascript 如何使用这种登录格式包括更改/重置密码?
如何包括重置按钮,以便更改或重置旧密码并保存新密码。如有答复,将不胜感激。多谢各位 代码 详情如下: HTMLJavascript 如何使用这种登录格式包括更改/重置密码?,javascript,html,Javascript,Html,如何包括重置按钮,以便更改或重置旧密码并保存新密码。如有答复,将不胜感激。多谢各位 代码 详情如下: HTML 你真的在做客户端身份验证吗?因为显然,我不能使用php,所以只能使用html和javascript。这种类型的身份验证提供零安全性,并向访问你页面的所有人发送正确的密码。任何人都可以查看源代码并查看所有正确的用户名和密码有没有更好的方法来代替php?为什么不能准确地使用服务器端语言? <html> <head> <title> Log<
你真的在做客户端身份验证吗?因为显然,我不能使用php,所以只能使用html和javascript。这种类型的身份验证提供零安全性,并向访问你页面的所有人发送正确的密码。任何人都可以查看源代码并查看所有正确的用户名和密码有没有更好的方法来代替php?为什么不能准确地使用服务器端语言?
<html>
<head>
<title> Log</title>
</head>
<body>
<div id="header">
<div class="pageWidth">
</div>
</div>
<div>
<table align = center>
<tr height = 100 /tr>
<tr height = 200
<td width = 400 align = center id = "box" /td>
<table>
<form name="login">
<tr id = "spacing" ></tr>
<tr align = center <td colspan =2 /td></tr>
<tr><td width=5>Username:</td><td width=300><input type="text" name="username" autofocus></td></tr>
<tr><td width=5>Password:</td><td width=300><input type="password" name="password"></td></tr>
<tr><td colspan = 2 align=right><input id="login" type="submit" onclick="check(this.form)" value="Login"/>
</table>
</div>
</form>
</table>
<script type="text/javascript" src="login.js"></script>
</body>
</html>
function check(form)
{
if(form.username.value == "name" && form.password.value == "pass")
{
window.open('');
}
else if(form.username.value == "name1" && form.password.value == "pass1")
{
window.open('');
}
else if(form.username.value == "name2" && form.password.value == "pass2")
{
window.open('');
}
else
{
window.open('');
}
}