execute a command in javascript [closed]
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.
精彩评论