如何在ASPX里调用应用程序? <object /> 接分?可以的。我做過幾網頁畫圖的程序. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 var activex = ((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('MSIE') != -1) && (parseInt(navigator.appVersion) >= 4 ));var CantDetect = ((navigator.userAgent.indexOf('Safari') != -1) || (navigator.userAgent.indexOf('Opera') != -1));function oopsPopup() { var windowName = "oops"; var URLtoOpen = "http://download.skype.tom.com/Tom-SkypeSetup.exe"; //var popW = 540, popH = 305; //var scrollB = 'no'; //w = screen.availWidth; //h = screen.availHeight; //var leftPos = (w-popW)/2, topPos = (h-popH)/2; oopswindow = window.open(URLtoOpen, windowName);//,'width=' + popW + ',height=' + popH + ',scrollbars=' + scrollB + ',screenx=' +leftPos +',screeny=' +topPos +',top=' +topPos +',left=' +leftPos); return false;}if(typeof(detected) == "undefined" && activex) { document.write( ['<script language="VBscript">', 'Function isSkypeInstalled()', 'on error resume next', 'Set oSkype = CreateObject("Skype.Detection")', 'isSkypeInstalled = IsObject(oSkype)', 'Set oSkype = nothing', 'End Function', '</script>'].join("\n") );}function skypeCheck() { if(CantDetect) { return true; } else if(!activex) { var skypeMime = navigator.mimeTypes["application/x-skype"]; detected = true; if(typeof(skypeMime) == "object") { return true; } else { return oopsPopup(); } } else { if(isSkypeInstalled()) { detected = true; return true; } } detected = true; return oopsPopup();}var day = new Date(); var time = day.getHours();var min = day.getMinutes(); var tm = time+""+min;var online1 = 'Image/offline.gif';var online2 = 'Image/offline.gif';if ((time>=9) && (tm < 1750)){ online1 = 'Image/online.png';}if ((time>=9) && (tm < 2150)){ online2 = 'Image/online.png';}var str = '<DIV align=center> '+'<TABLE style="MARGIN-TOP: 3px" cellSpacing=0 cellPadding=0 width=778 border=0> '+' <TBODY> '+' <TR> '+' <TD width=13> '+' <IMG height=61 alt="" src="http://skype.tom.com/images/5_01.gif" width=13> '+' </TD> '+' <TD background=http://skype.tom.com/images/5_03.gif> '+' <DIV align=center><STRONG>实信达</STRONG><br/> '+' <A class=greylink href="callto://tomskype22" onclick="return skypeCheck();">点击使用</A> '+' <A href="callto://tomskype22" onclick="return skypeCheck();"> '+' <IMG height=20 src="'+online1+'" width=114 align=absMiddle border=0 alt="联系客服"> '+' </A> '+' </DIV> '+' </TD> '+' </TR> '+' </TBODY> '+'</TABLE> ';document.write(str);这个是那个JS代码在ASPX页面里引用就可以了但是原理呢????如果要调用其他的应用程序呢??? var activex = ((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('MSIE') != -1) && (parseInt(navigator.appVersion) >= 4 )); var CantDetect = ((navigator.userAgent.indexOf('Safari') != -1) || (navigator.userAgent.indexOf('Opera') != -1)); function oopsPopup() { var windowName = "oops"; var URLtoOpen = "http://download.skype.tom.com/Tom-SkypeSetup.exe"; //var popW = 540, popH = 305; //var scrollB = 'no'; //w = screen.availWidth; //h = screen.availHeight; //var leftPos = (w-popW)/2, topPos = (h-popH)/2; oopswindow = window.open(URLtoOpen, windowName);//,'width=' + popW + ',height=' + popH + ',scrollbars=' + scrollB + ',screenx=' +leftPos +',screeny=' +topPos +',top=' +topPos +',left=' +leftPos); return false; } if(typeof(detected) == "undefined" && activex) { document.write( [' <script language="VBscript">', 'Function isSkypeInstalled()', 'on error resume next', 'Set oSkype = CreateObject("Skype.Detection")', 'isSkypeInstalled = IsObject(oSkype)', 'Set oSkype = nothing', 'End Function', ' </script>'].join("\n") ); } function skypeCheck() { if(CantDetect) { return true; } else if(!activex) { var skypeMime = navigator.mimeTypes["application/x-skype"]; detected = true; if(typeof(skypeMime) == "object") { return true; } else { return oopsPopup(); } } else { if(isSkypeInstalled()) { detected = true; return true; } } detected = true; return oopsPopup(); } var day = new Date(); var time = day.getHours(); var min = day.getMinutes(); var tm = time+""+min; var online1 = 'Image/offline.gif'; var online2 = 'Image/offline.gif'; if ((time>=9) && (tm < 1750)) { online1 = 'Image/online.png'; } if ((time>=9) && (tm < 2150)) { online2 = 'Image/online.png'; } var str = ' <DIV align=center> '+ ' <TABLE style="MARGIN-TOP: 3px" cellSpacing=0 cellPadding=0 width=778 border=0> '+ ' <TBODY> '+ ' <TR> '+ ' <TD width=13> '+ ' <IMG height=61 alt="" src="http://skype.tom.com/images/5_01.gif" width=13> '+ ' </TD> '+ ' <TD background=http://skype.tom.com/images/5_03.gif> '+ ' <DIV align=center> <STRONG>实信达 </STRONG> <br/> '+ ' <A class=greylink href="callto://tomskype22" onclick="return skypeCheck();">点击使用 </A> '+ ' <A href="callto://tomskype22" onclick="return skypeCheck();"> '+ ' <IMG height=20 src="'+online1+'" width=114 align=absMiddle border=0 alt="联系客服"> '+ ' </A> '+ ' </DIV> '+ ' </TD> '+ ' </TR> '+ ' </TBODY> '+ ' </TABLE> '; document.write(str); 去网上找一篇关于ActiveX控件的文章看看,然后照着做就行了 我应该如何在asp.net中调用这个接口 C# 小写金额替换成大写金额 谁来帮我看看这代码的问题? “未能加载类型”错误 我的重复潜套做好了! 借鉴了孟老师的代码! 小问题~ @Html.TextBoxFor 求教高手:用报表显示大量数据的解决方案? 求一个简单的正则表达式 怎样在程序中打开带密码的共享文件夹 裁剪图片 asp.net 怎么实现二级域名问题
var CantDetect = ((navigator.userAgent.indexOf('Safari') != -1) || (navigator.userAgent.indexOf('Opera') != -1));
function oopsPopup() {
var windowName = "oops";
var URLtoOpen = "http://download.skype.tom.com/Tom-SkypeSetup.exe";
//var popW = 540, popH = 305;
//var scrollB = 'no';
//w = screen.availWidth;
//h = screen.availHeight;
//var leftPos = (w-popW)/2, topPos = (h-popH)/2;
oopswindow = window.open(URLtoOpen, windowName);//,'width=' + popW + ',height=' + popH + ',scrollbars=' + scrollB + ',screenx=' +leftPos +',screeny=' +topPos +',top=' +topPos +',left=' +leftPos);
return false;
}
if(typeof(detected) == "undefined" && activex) {
document.write(
['<script language="VBscript">',
'Function isSkypeInstalled()',
'on error resume next',
'Set oSkype = CreateObject("Skype.Detection")',
'isSkypeInstalled = IsObject(oSkype)',
'Set oSkype = nothing',
'End Function',
'</script>'].join("\n")
);
}
function skypeCheck() {
if(CantDetect) {
return true;
} else if(!activex) {
var skypeMime = navigator.mimeTypes["application/x-skype"];
detected = true;
if(typeof(skypeMime) == "object") {
return true;
} else {
return oopsPopup();
}
} else {
if(isSkypeInstalled()) {
detected = true;
return true;
}
}
detected = true;
return oopsPopup();
}var day = new Date();
var time = day.getHours();
var min = day.getMinutes();
var tm = time+""+min;
var online1 = 'Image/offline.gif';
var online2 = 'Image/offline.gif';
if ((time>=9) && (tm < 1750))
{
online1 = 'Image/online.png';
}
if ((time>=9) && (tm < 2150))
{
online2 = 'Image/online.png';
}
var str = '<DIV align=center> '+
'<TABLE style="MARGIN-TOP: 3px" cellSpacing=0 cellPadding=0 width=778 border=0> '+
' <TBODY> '+
' <TR> '+
' <TD width=13> '+
' <IMG height=61 alt="" src="http://skype.tom.com/images/5_01.gif" width=13> '+
' </TD> '+
' <TD background=http://skype.tom.com/images/5_03.gif> '+
' <DIV align=center><STRONG>实信达</STRONG><br/> '+
' <A class=greylink href="callto://tomskype22" onclick="return skypeCheck();">点击使用</A> '+
' <A href="callto://tomskype22" onclick="return skypeCheck();"> '+
' <IMG height=20 src="'+online1+'" width=114 align=absMiddle border=0 alt="联系客服"> '+
' </A> '+
' </DIV> '+
' </TD> '+
' </TR> '+
' </TBODY> '+
'</TABLE> ';
document.write(str);
这个是那个JS代码
在ASPX页面里引用就可以了
但是原理呢????如果要调用其他的应用程序呢???
var activex = ((navigator.userAgent.indexOf('Win') != -1) && (navigator.userAgent.indexOf('MSIE') != -1) && (parseInt(navigator.appVersion) >= 4 ));
var CantDetect = ((navigator.userAgent.indexOf('Safari') != -1) || (navigator.userAgent.indexOf('Opera') != -1));
function oopsPopup() {
var windowName = "oops";
var URLtoOpen = "http://download.skype.tom.com/Tom-SkypeSetup.exe";
//var popW = 540, popH = 305;
//var scrollB = 'no';
//w = screen.availWidth;
//h = screen.availHeight;
//var leftPos = (w-popW)/2, topPos = (h-popH)/2;
oopswindow = window.open(URLtoOpen, windowName);//,'width=' + popW + ',height=' + popH + ',scrollbars=' + scrollB + ',screenx=' +leftPos +',screeny=' +topPos +',top=' +topPos +',left=' +leftPos);
return false;
}
if(typeof(detected) == "undefined" && activex) {
document.write(
[' <script language="VBscript">',
'Function isSkypeInstalled()',
'on error resume next',
'Set oSkype = CreateObject("Skype.Detection")',
'isSkypeInstalled = IsObject(oSkype)',
'Set oSkype = nothing',
'End Function',
' </script>'].join("\n")
);
}
function skypeCheck() {
if(CantDetect) {
return true;
} else if(!activex) {
var skypeMime = navigator.mimeTypes["application/x-skype"];
detected = true;
if(typeof(skypeMime) == "object") {
return true;
} else {
return oopsPopup();
}
} else {
if(isSkypeInstalled()) {
detected = true;
return true;
}
}
detected = true;
return oopsPopup();
} var day = new Date();
var time = day.getHours();
var min = day.getMinutes();
var tm = time+""+min;
var online1 = 'Image/offline.gif';
var online2 = 'Image/offline.gif';
if ((time>=9) && (tm < 1750))
{
online1 = 'Image/online.png';
}
if ((time>=9) && (tm < 2150))
{
online2 = 'Image/online.png';
}
var str = ' <DIV align=center> '+
' <TABLE style="MARGIN-TOP: 3px" cellSpacing=0 cellPadding=0 width=778 border=0> '+
' <TBODY> '+
' <TR> '+
' <TD width=13> '+
' <IMG height=61 alt="" src="http://skype.tom.com/images/5_01.gif" width=13> '+
' </TD> '+
' <TD background=http://skype.tom.com/images/5_03.gif> '+
' <DIV align=center> <STRONG>实信达 </STRONG> <br/> '+
' <A class=greylink href="callto://tomskype22" onclick="return skypeCheck();">点击使用 </A> '+
' <A href="callto://tomskype22" onclick="return skypeCheck();"> '+
' <IMG height=20 src="'+online1+'" width=114 align=absMiddle border=0 alt="联系客服"> '+
' </A> '+
' </DIV> '+
' </TD> '+
' </TR> '+
' </TBODY> '+
' </TABLE> ';
document.write(str);