首页 / 浏览问题 / 三维GIS / 问题详情
'allow-scripts' permission is not set
10EXP 2020年09月22日
你好,我在三维地图上弹出一个对话框,然后使用<a>标签,连接到一个test.jsp地址,这个test.jsp地址报错,如下图:

<a>连接到test.jsp页面:

 attributes["操作"] = "<a style='color:red;' target='_blank' href='"+getRootPath()+"staticView/clkk/test.jsp?sbdm="+data.bh+"'>播放视频</a>";

test.jsp连接打开后报:

Blocked script execution in 'http://192.168.4.178:8080/PGIS_KYP/staticView/clkk/test.jsp?sbdm=41142325051210000372' because the document's frame is sandboxed and the 'allow-scripts' permission is not set.

请问怎么解决

1个回答

访问受限,viewer初始化后设置
document.getElementsByClassName("cesium-infoBox-iframe")[0].sandbox="allow-same-origin allow-popups allow-forms allow-scripts";
即可。
6,077EXP 2020年09月22日
...