如何控制浏览器警报和自动填写密码 [英] how to control browser alert and auto fill password

查看:122
本文介绍了如何控制浏览器警报和自动填写密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在iframe中显示pdf文件,并保持密码保护(pdf文件)。因此,当页面加载时,浏览器会显示一条警告消息此文档受密码保护。请输入密码。所以我希望该用户只能在浏览器中打开此文档,如果他将下载该pdf文件,由于受密码保护,他无法打开该文档。我可以用jquery解决这个问题吗?密码为123456



访问 http://sitestudy.co .nf / iframe.html 显示演示或 http://fiddle.jshell.net/dTbjE/

I want to show a pdf file in iframe and i keep it(pdf file) password protected. So when the page is loaded then browser show a alert message "this document is password protected. please enter a password". So i want that user can open this document in browser only and if he will download that pdf file, he can not open that due to password protected. Can I solve this with jquery? the password is "123456"

Visit http://sitestudy.co.nf/iframe.html to show demo or http://fiddle.jshell.net/dTbjE/

推荐答案

您看到的行为 - 询问PDF密码 - 是浏览器的一部分,而不是开发人员添加的一些技巧。

As只要您的PDF受密码保护,并且您尝试在浏览器窗口中显示它 - 它(实际上用于显示PDF的基础应用程序)将作为密码。

如果PDF没有下载显示它,当用户试图显示它时,将需要密码 - 在任何应用程序中......
The behavior you see - asking PDFs password - is part of the browser and not some 'trick' added by the developer.
As long as your PDF is password protected, and you try to display it in the browser window - it (in fact the underlying application used to display the PDF) will as the password.
If the PDF downloaded without displaying it, the password will be required when the user will try to display it - in whatever application...


显示 PDF in我猜, iFrame 直接无效。



您应该使用您正在使用的库或dll来搜索某些方法来保护它。
Showing PDF in iFrame directly won't work, I guess.

You should search some methods to do it using the library or dll which you are using to make it protected.


这篇关于如何控制浏览器警报和自动填写密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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