如何在html / javascript中实现登录弹出窗口 [英] How to implement login popup in html/javascript

查看:1954
本文介绍了如何在html / javascript中实现登录弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上,我想创建一个登录弹出窗口,就像很多路由器必须访问设置页面一样:



是否可以在html文件中实现它,还是仅用于基于服务器的访问?

解决方案

您应该阅读以下内容:

http://en.wikipedia.org/wiki/Basic_access_authentication

和这:



http://www.php.net/manual/en/features.http-auth.php



简言之:



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:

Is there a way to get the exact popup in the picture? i.e its a browser based popup not styled?

I never stated, that one can not create SIMILAR styled popup with js+html. The answer was about invoking the exact popup.

这篇关于如何在html / javascript中实现登录弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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