您好目前场景是A系统通过按钮触发 访问B系统的某个页面 目前可以拿出B系统中html元素,但css和js均失效
function viewForm(id) {
$.ajax({
type: "post",
url:"http://localhost:8980/js/rest/v1/cert/form",
dataType: "html",
data: {"id":id},
headers : {
'Authorization':'Basic c8feedd25f6a06ac121f566e28fb3a6f9775b5277038770a80945e43',
//'Content-Type':'application/json;charset=utf8',
'Basic-User':'restful',
'Realm':'Local',
},
success: function(data){
let b = new Blob([data], {
type: 'text/html'
});
let url = URL.createObjectURL(b)
layer.open({
type: 1, //可传入的值有:0(信息框,默认)1(页面层)2(iframe层)3(加载层)4(tips层)
title: ['权证查看', 'font-size:20px; color:#fff;background-color:#1E6EEB ;height:6vh;line-height: 6vh;border-top-left-radius: 6px;border-top-right-radius: 6px;'],//数组第二项可以写任意css样式;如果你不想显示标题栏,你可以title: false
content: data,
area: ['61.8%', '90%'],
btn: ['确定', '关闭'],
maxmin: true,
shadeClose: true, //点击遮罩关闭层
yes: function(index, layero){
batchDownload();
layer.close(index);
},
btn2: function(index, layero){
layer.close(index)
}
});
},
error: function(data){ alert("error"); } ,
});
}
是设置上了 不生效 还是 根本无法设置上 。
浏览器 应该是 禁止 两个 不同 域的 页面 进行交互