【发布时间】:2013-01-20 13:34:36
【问题描述】:
我想显示在假设(http://myservre/reports/myrepoft.pdf) 的网络路径中可用的报告(pdf)。目前,它正在像这样通过 IFrame 显示。
strReportPDFFile = "`http://myservre/reports/myrepoft.pdf`"
<IFRAME frameborder="1" onload="onchangestate()" src="" id="ifrmShowReport" frameborder="0" height="100%" width="100%" marginwidth="0" align="top" style="overflow: none;overflow-x: auto;display:none"></IFRAME>
document.getElementById("formContainer").style.display = "block";
document.getElementById("ifrmShowReport").style.display = "block";
document.getElementById("ifrmShowReport").src = strReportPDFFile;
网址显示在地址栏中,我想隐藏网址。可能吗 ?如果没有,请建议一些更好的选择。
【问题讨论】:
-
我猜这取决于为什么你要隐藏它?
-
有什么用?所以没人能偷吗?即使您将其隐藏在 iframe 中,也很容易发现。浏览器必须有 一些 URL,以便它可以获取文档
-
我的客户说这是潜在的线程。所以我们想隐藏它
-
告诉你的客户他是个白痴。 :P 说真的,这样做的唯一原因可能是因为它看起来会更好?不知道。
-
这不是威胁。他们可能只是想限制下载次数。例如,您可以创建一个只能下载 X 次的临时文件名,并且获取生成文件的唯一方法是登录。
标签: c# javascript html iframe