开发者

execute a command in javascript [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help cen开发者_如何学Cter. Closed 11 years ago.

I want to know how to execute a DOS command from javascript. Please help me.


Something like this:

var shell = new ActiveXObject("WScript.Shell");
shell.run(params);


you can run commands from javascript if you are a mozilla add-on using xpcom.

Take a look at this. http://jsdoodnauth.wordpress.com/2008/12/04/run-external-apps-using-xpcom-interfaces/

Basically browsers run javascript in a sandbox so scripts can't damage the local computer. To run scripts you have to create a custom made solution for your browser and install it locally so you can get outside the sandbox.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜