问题描述
基本上,我想创建一个登录弹出窗口,就像很多路由器必须访问设置页面一样:是否可以在html文件中实现它,还是仅用于基于服务器的访问?
您应该阅读以下内容:
和这:
简言之:
1您可以使用特殊标题调用此弹出窗口。
2您只能在页面加载前调用此弹出窗口。
3您无法使用html + js来执行此操作。
4您可以' t用纯j的密码输入调用提示窗口。
UPD:
回答了这个问题,从作者到主帖:
我从来没有说过,不能用js创建SIMILAR样式的弹出窗口+ HTML。答案是关于调用确切的弹出窗口。
Basically, I want to create a login popup like the one that a lot of routers have to get access to the setup page:
is it possible to implement this on an html file at all or is it only for server based access?
You should probably read this:
http://en.wikipedia.org/wiki/Basic_access_authentication
and this:
http://www.php.net/manual/en/features.http-auth.php
In short words:
1 You can invoke this popup using special headers.
2 You can invoke this popup only before page starts loading.
3 You can't do this using html+js only.
4 You can't invoke prompt windows with password-like inputs with pure js.
UPD:That question was answered, having the following comment from author to main post in mind:
I never stated, that one can not create SIMILAR styled popup with js+html. The answer was about invoking the exact popup.
这篇关于如何在html / javascript中实现登录弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!