Run cmd from browser - by JS
问题 I want to open cmd window from my web page(HTML). I'm using JS but something is not right because when i press, the function isn't called. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <script type="text/javascript"> <!-- function runCmd(command, option) { var char34 = String.fromCharCode(34); var wsh = new ActiveXObject('WScript.Shell'); if (wsh) { command = 'cmd /k ' + char34 + wsh.ExpandEnvironmentStrings(command) + ' '