Javascript 如何从asp.net web应用程序检查pc中是否安装了应用程序
我需要从我的web应用程序打开windows应用程序,我知道怎么做。问题是我无法确定应用程序是否已安装。目前我正在使用以下代码进行检查Javascript 如何从asp.net web应用程序检查pc中是否安装了应用程序,javascript,jquery,asp.net,Javascript,Jquery,Asp.net,我需要从我的web应用程序打开windows应用程序,我知道怎么做。问题是我无法确定应用程序是否已安装。目前我正在使用以下代码进行检查 var win= window.open(url, 'send', 'width=100,height=100,top=1,left=1,resizable=yes', '1'); if(win==null || win.closed==true) { alert("Application not installe
var win= window.open(url, 'send', 'width=100,height=100,top=1,left=1,resizable=yes', '1');
if(win==null || win.closed==true)
{
alert("Application not installed.");
}
它的工作正常,但问题是,如果弹出窗口被阻止,那么我得到空值,然后即使安装了应用程序,警报也会出现。那么,有没有办法从web应用程序检查pc中是否安装了应用程序?请尝试以下方法:
var win= window.open(url, 'send', 'width=100,height=100,top=1,left=1,resizable=yes', '1');
if(!win|| win.closed || typeof win.closed=='undefined')
{
//POPUP BLOCKED
return;
}
if(win==null || win.closed==true)
{
alert("Application not installed.");
}