ActiveXObject的替代方案 [英] Alternative for ActiveXObject

查看:2454
本文介绍了ActiveXObject的替代方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<html>
<head>
    <title>Application Executer</title>
  <!--  <hta:application id="oMyApp" xmlns:hta="#unknown">
	    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/ooVoo.exe", 1, false);
        }
    </script>
</head>
<body>
	<input type="button" value="Run oovoo" onclick="RunFile();"/>
</body>
</html>



THIS是我的CODE可以帮助我在所有浏览器(firefox,chrome)等中运行ActiveXObject的替代方案。


THIS IS my CODE can any1 help me the alternative for ActiveXObject to run in all browser(firefox,chrome)etc.

推荐答案

浏览器故意不允许你执行代码用户的机器因为这是一个巨大的安全风险。你可以做的是创建一个文件的超链接,但即使这样,一些浏览器也会限制它,因为超链接将指向本地。



我建议你改变你的方法或坚持使用IE浏览器。
Browsers purposely do not allow you to execute code on the user's machine as that is a huge security risk. What you might be able to do is create a hyperlink to the file but even then some browsers will have it restricted because the hyperlink will be pointing locally.

I suggest you change your approach or stick with IE only.


这篇关于ActiveXObject的替代方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆