我可以制作本地独立的 JavaScript 程序吗?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8958976/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-26 05:09:04  来源:igfitidea点击:

Can I make a local Standalone JavaScript program?

javascriptuser-interfaceweb-applicationslocal

提问by QuinnFreedman

Possible Duplicate:
Can you do Desktop Development using JavaScript?

可能的重复:
您可以使用 JavaScript 进行桌面开发吗?

I am very familiar with web-based JavaScript as it relates to html and canvas, but I was wondering if it would be possible to make a complete standalone application using javascript that would NOT open in a browser. Is there any GUI or command prompt that would allow me to do this?

我非常熟悉基于 web 的 JavaScript,因为它与 html 和 canvas 相关,但我想知道是否有可能使用无法在浏览器中打开的 javascript 制作完整的独立应用程序。是否有任何 GUI 或命令提示符可以让我这样做?

If not, I might be open to writing some other program that could read html, as Notch did with the Minecraft login screen. Is there an easy way to do this?

如果没有,我可能愿意编写其他一些可以读取 html 的程序,就像 Notch 在 Minecraft 登录屏幕上所做的那样。是否有捷径可寻?

采纳答案by Scott Smith

Not sure if this is what you are asking, but Node.js might be it.

不确定这是否是您要问的,但 Node.js 可能是。

http://nodejs.org/

http://nodejs.org/

回答by voithos

There are frameworks and libraries that are designed for this. Here are a few:

有专门为此设计的框架和库。这里有一些:

  • Titanium- a platform that uses the web technologies (HTML, Javascript, CSS) to create cross platform (reallycross platform) applications. Looks verynice, although I haven't used it.

  • Adobe AIR- uses HTML and ActionScript/JavaScript to build native applications, although they've dropped support for Linux. :(

  • Titanium- 一个使用网络技术(HTML、Javascript、CSS)来创建跨平台(真正跨平台)应用程序的平台。看起来不错,虽然我没用过。

  • Adobe AIR- 使用 HTML 和 ActionScript/JavaScript 来构建本机应用程序,尽管它们已经放弃了对 Linux 的支持。:(

回答by Dave Newton

There's also Rhino and Swing on the JVM.

JVM 上还有 Rhino 和 Swing。