Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/475.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何通过处理访问控制\允许\来源来查看安全的intranet站点_Javascript_Jquery_Html - Fatal编程技术网

Javascript 如何通过处理访问控制\允许\来源来查看安全的intranet站点

Javascript 如何通过处理访问控制\允许\来源来查看安全的intranet站点,javascript,jquery,html,Javascript,Jquery,Html,我已经编写了一个简单的html文件,用于在同一页面的表下显示超链接提供的页面 <!DOCTYPE html> <html> <head> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> <script> $(function(){ $('.link'

我已经编写了一个简单的html文件,用于在同一页面的表下显示超链接提供的页面

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script>
$(function(){
  $('.link').on("click", function(e) {
    e.preventDefault();
    var href = $(this).attr('href');
    $("#content").html('<object data='+href+' />');
    return false;
  });       
});
</script>
<style>
object {
  width: 1570px;
  height: 1000px;
  border: 1px solid green;
}
</style>
</head>
<body bgcolor="#EBF5FB">
<h1 align="center" >SLA Monitor Reports </h1>
<div align="center">

<table cellpadding="25px" border=1>    
<tr>

<td><a class="link" href="https://www.wikipedia.org/"><img src="\\TSHomeServer\TSHome$\231456\Downloads\1ITD.png" alt="SRs Proposed Due Date" style="width:200px"></a></td>
<td><a class="link" href="https://bwp.wdf.nova.corp/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.nova.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.nova.ip.bi.bex?BOOKMARK=CU4A95OJ17A355B2112ML30G6"><img src="\\TSHomeServer\TSHome$\231456\Downloads\1Google.png" alt="Ticket Aging" style="width:200px"></a></td>
</tr>
</table>
<br><br>
</div>
<div id="content">
</div>
</body>
</html>

$(函数(){
$('.link')。在(“单击”,函数(e){
e、 预防默认值();
var href=$(this.attr('href');
$(“#内容”).html(“”);
返回false;
});       
});
反对{
宽度:1570px;
高度:1000px;
边框:1px纯绿色;
}
SLA监视器报告


第一个指向wikipedia.org的超链接正确地显示在表下的div中

但是,当我尝试访问第二个链接时,即指向托管在intranet服务器中的bw报告的intranet站点,我会得到一个访问控制允许源错误,页面会继续尝试针对bw服务器进行验证

但是,如果我尝试在新的浏览器窗口中打开相同的intranet链接,它将进行验证,并且我可以访问BW报告


请告诉我如何使用div标记访问同一页面中的同一BW报告,并处理此访问控制\u允许\u来源问题。

服务器需要使用此类CORS标头进行响应-但是,“代码”您已经展示了不应该有任何CORS问题,因为它是一个静态页面-问题似乎在
https://bwp.wdf.nova.corp/irj/servlet/prt/portal/prtroot/pcd!你的内容!2fcom.nova.pct!2F平台附加组件!2fcom.sap.ip.bi!2新闻!2fcom.nova.ip.bi.bex?BOOKMARK=cu4a95oj17a35b2112ml30g6
-但我认为您已经在新选项卡中打开了该链接,并且没有收到任何CORS错误。。。为了在
对象
元素中查看intranet站点,intranet服务器需要启用CORS。