<script>
function showTips() {
var dom = document.createElement("div");
var t = '${ROOT_PATH}images/tipImg-ioswx.png';
dom.style.cssText = "position:fixed;z-index:100;top:0;left:0;width:100%;height:100%;background:url(" + t + ") top right no-repeat;background-size:150px 125px;background-color:rgba(0,0,0,0.7);";
dom.onclick = function() {
document.body.removeChild(dom);
};
document.body.appendChild(dom);
}
function changeHref() {
var agent = navigator.userAgent.match(/MicroMessenger/i);
if (Boolean(agent)) {
$('a').each(function(index,item){
if (/\.doc|\.docx|\.rar|\.zip|\.xls|\.xlsx|\.pdf|\.ppt|\.ppts|\.cab$/.test(item.href)) {
item.href='javascript:;';
$(item).on('click',showTips);
}
})
}
}
$(function(){
setTimeout(function(){
changeHref();
},500)
})
</script>
图片资源: