在html网站中登录身份验证 [英] Login authentication in html website

查看:215
本文介绍了在html网站中登录身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个简单的html页面,其中包含(用户名和密码)字段和登录按钮。

我的用户名和密码是固定的。所以我不想使用任何数据库。

当我点击登录按钮时,我应该如何验证?

i have created a simple html page with (username and password)field and a login button.
my username and password are fixed.so i dont want to use any database.
how should i authenticate that when i click the login button?

推荐答案

这样做的唯一方法是使用javascript。但是如果你在javascript中这样做,几乎没有使用这个用户ID和密码,因为javascript也会被推送到客户端,任何人都可以看到用户ID和密码并登录。



所以我想说的是,如果你没有服务器端技术来存储用户凭证,即使你实现了这个功能,它实际上也是徒劳的。
The only way to do this is by javascript. But if you do it in javascript there is virtually no use of this user id and password as the javascript will also be pushed to the client and anyone can see the user id and password and log in.

So what I am trying to say is that, if you dont have a server side technology to store the user credentials, even if you implement this functionality, it will actually be futile.


这篇关于在html网站中登录身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆