[英]Login System, Using javascript
我想要做的是获取我的代码并对其进行编辑,以便我可以将创建的用户配置文件保存到我尚未创建的数据库中。 我该怎么做?
我还想创建一个内容管理系统,允许我在数据库中编辑添加搜索和删除用户这可能吗,我该怎么做?
这是我的代码:
<html>
<head>
<title>
Login page
</title>
</head><body>
<h1 style="font-family:Comic Sans Ms;text-align="center";font-size:20pt;
color:#00FF00;>
Please Login
</h1>
<form name="login">
Username<input type="text" name="userid"/>
Password<input type="password" name="pswrd"/>
<input type="button" onclick="check(this.form)" value="Login"/>
<input type="reset" value="Cancel"/>
</form>
<script language="javascript">
function check(form)
{
if(form.userid.value == "Stephen" && form.pswrd.value == "Steveman22")
{
window.open('target.html')
}
else
{
alert("Error Password or Username Required")
}
}
</script>
</body>
</html>
你不能做客户端。
你可以做什么:
身份验证逻辑客户端没有意义。 您的客户端代码是公开的,因此您的凭据也是公开的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.