使用HTML启动应用程序
我知道使用HTML启动应用程序,html,registry,launching-application,yahoo-messenger,Html,Registry,Launching Application,Yahoo Messenger,我知道 <a href = 'ymsgr:sendim?contactID'>Send me a message</a> 将推出雅虎信使 我可以创建类似这样的东西来启动MSWord或我自己的应用程序吗?以下是对您所描述内容的解释: 在这里您可以找到Microsoft Office的URI规范: 比如 ms-word:ofv|u|http://yoursite.com/document.docx 将在MS Word中以只读模式打开document.docx 下面是
<a href = 'ymsgr:sendim?contactID'>Send me a message</a>
将推出雅虎信使
我可以创建类似这样的东西来启动MSWord或我自己的应用程序吗?以下是对您所描述内容的解释: 在这里您可以找到Microsoft Office的URI规范: 比如
ms-word:ofv|u|http://yoursite.com/document.docx
将在MS Word中以只读模式打开document.docx
下面是关于如何在Windows中将自己的应用程序注册到URI方案的文档:
这也可以通过简单地将html文件命名为.hta来实现,如果该文件用于本地项目,则可以使用该文件
<html>
<head>
<title>Application Executer</title>
<HTA:APPLICATION ID="oMyApp" APPLICATIONNAME="Application Executer" BORDER="no" CAPTION="no" SHOWINTASKBAR="yes" SINGLEINSTANCE="yes" SYSMENU="yes" SCROLL="no" WINDOWSTATE="normal">
<script type="text/javascript" language="javascript">
function RunFile() { WshShell = new ActiveXObject("WScript.Shell"); WshShell.Run("c:/windows/system32/notepad.exe", 1, false); }
</script>
</head>
<body>
<input type="button" value="Run Notepad" onclick="RunFile();"/>
</body>
</html>
应用程序执行器
函数RunFile(){WshShell=newActiveXObject(“WScript.Shell”);WshShell.Run(“c:/windows/system32/notepad.exe”,1,false);}
它对我不起作用。默认情况下浏览器允许ActiveX吗?应该是这样的,dpes文件以.hta结尾?这对我很有效。