How to invoke Linux command with JavaScript

后端 未结 3 788
盖世英雄少女心
盖世英雄少女心 2021-01-22 05:41

I am new in JavaScript, and now I want to run a Linux application in JavaScript and show the result in a web page. It all happens in client without a server. But for security is

3条回答
  •  情书的邮戳
    2021-01-22 06:18

    With javascript alone can't be done. But you have at least two option to do this using javascript plus other technologies.

    The first one is what Jivings sent, using Jquery to sent a post request to a scripting language at the server side.

    The second way is to install Node.js. This platform runs on javascript engine, and has all the features you need from the language. After installing it just see this post that explains how to execute a command.

提交回复
热议问题