标签:
在文档库插入script editor 部件,在部件插入如下代码即可:
$(document).ready(
function () {
setInterval(
function () {
$("a[onclick*=‘return DispEx‘][target!=‘_blank‘]").attr("target", "_blank").removeAttr("onclick");
$("td.ms-vb-icon>img[onclick]:not([documentUrl])").click(function (e) {
window.open($(this).attr("documentUrl"), "_blank");
e.stopPropagation();
e.preventDefault();
returnfalse;
}).each(function () {
$(this).attr("documentUrl", $.trim(String($(this).attr("onclick")).split("=")[1].replace(/["‘{}]/g, "").split(";")[0]));
this.onclick = null;
});
}, 500);
}
);
参考:http://blog.csdn.net/chenxinxian/article/details/38319971
标签:
原文地址:http://www.cnblogs.com/liuqqqqqq/p/5664191.html