<object /> 接分?可以的。我做過幾網頁畫圖的程序.

解决方案 »

  1.   

    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页面里引用就可以了
    但是原理呢????如果要调用其他的应用程序呢???
      

  2.   


    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); 
      

  3.   

    去网上找一篇关于ActiveX控件的文章看看,然后照着做就行了