var url = selected[0].PUBLICMATERIAL;
if(!url){
console.log("获取公示材料查看路径失败!");
return false;
}
try {
var a = document.createElement("a");
a.setAttribute("href", url);
a.setAttribute("target", "_blank");
a.setAttribute("id", "openwin");
document.body.appendChild(a);
a.click();
a.remove();
}
catch(err){
console.log('打开公示材料出错,尝试使用 window.open() 打开');
window.open(url);
}
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。