zoukankan      html  css  js  c++  java
  • Web通过JS调用客户端

    代码实现==》
    <html> 
    <head> 
    <script language="javascript"> 
    function Run(strPath) 
    { 
    var objShell = new ActiveXObject("wscript.shell"); 
    objShell.exec(strPath); 
    objShell = null; 
    } 
    </script> 
    </head> 
    <body> 
    请输入要运行的程序路径:<br> 
    <input name=exe type=text size=20 value= "E:\DCWeb\PrinterBarcode\PrinterBarcode\PrinterBarcode\bin\Debug\PrinterBarcode.exe""%1";> 
    <BUTTON class=button onclick="Run(exe.value)">确定</BUTTON> 
    </body> 
    </html>
    
    reg_test.reg文件==》

    Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOTHelloWorld] @="HelloWorld Protocol" "URL Protocol"="" [HKEY_CLASSES_ROOTHelloWorldDefaultIcon] @="E:\HW_TEST\HelloWorld.exe,1" [HKEY_CLASSES_ROOTHelloWorldshell] @="" [HKEY_CLASSES_ROOTHelloWorldshellopen] @="" [HKEY_CLASSES_ROOTHelloWorldshellopencommand] @=""E:\HW_TEST\HelloWorld.exe" "%1""

    注意:E:\DCWeb\PrinterBarcode\PrinterBarcode\PrinterBarcode\bin\Debug\PrinterBarcode.exe——需要启动的程序

    运行方式:helloworld://hello_world/Apara=abc&Bpara=001

    实例下载地址:http://download.csdn.net/detail/u010713920/9643071

  • 相关阅读:
    CodeForces
    设计模式之装饰模式和代理模式区别与联系
    java反射 概念
    Java 反射详解 转载
    Spring--AOP 例子
    MD5加密
    面向对象编程思想(OOP)
    软件测试assert
    junit4.9测试用例 spring测试用例 Assert 注解
    断言
  • 原文地址:https://www.cnblogs.com/YYkun/p/5920019.html
Copyright © 2011-2022 走看看