废话不多说 https://github.com/ismailhabib/custom-protocol-detection 这个地址区下载一个 然后放到项目中 var href=document.getElementById("openwindowsoft").href; console.log(href) window.protocolCheck(href, function () { showmessage("检测到没有安装升级工具,即将下载升级包,请手动安装",5000) });