使用javascript:openwindow打开pdf文件时出现“访问被拒绝"错误
问题描述:
当我尝试使用javascript打开窗口打开pdf文件时,出现访问被拒绝"错误.
我已经提到了这条路.但是,pdf页面没有出现,并且还会出现访问被拒绝"错误.
参见代码和路径
------------------
I am getting ''Access Denied'' Error when i am trying to open pdf file using javascript open window.
I have mentioned the path already. But, the pdf page is not coming and also getting ''Access Denied'' Error.
see code and path
------------------
function openwindow(url,title)
{
var MovWin = window.open(url, 'Newwindow','fullscreen=no,location=no,directories=no,toolbar=no,menubar=no,left=0,top=0,height=700,width=1020,scrollbars=yes,resizable=yes');
MovWin.document.title = title;
}
<tr>
<td width="50%" valign="top" align="left"> 2.1
<a style="text-decoration: none; color: #000080;" title="text" href="java<!-- no -->script: void(0)">
onmouseover="this.style.fontWeight=''bold''" onmouseout="this.style.fontWeight=''normal''"
önclick="javascript:openwindow(''C:\\ABA\ABC1\Pro\APPLICATION\USA\Documents\GENERAL EMPLIST.pdf'',''New Window'')">Policy</a></td>
</tr>
答
以这种方式使用网址!
use the url this way!!!!!
var url="C:/\Documents and Settings/\sanjeev.a/\Desktop/\practicingApp/\Visual-Studio-vNext-Preview-Web[1].pdf";