是“Javascript"吗?也是服务器端语言? [英] Is "Javascript" also a server side language?

查看:48
本文介绍了是“Javascript"吗?也是服务器端语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几年前,我在一些网站上读到JavaScript 只是一种客户端语言".

Few year back I read on some websites that "JavaScript is only a client-sided language".

是这样吗?如果不是,那么为什么?

is it so? if not then why?

推荐答案

尽管 JavaScript 最初是为了在浏览器中使用而开发的,但该语言本身从未成为严格的客户端语言.

Eventhough JavaScript was first developed to be used in a browser, the language itself has never been a strict client side language.

除了一些创建 HTML 标签的字符串方法之外,语言本身没有任何特定于客户端编程的内容.与浏览器相关的一切都在 DOM 中,而不是在 JavaScript 语言中.

Aside from a few string methods that create HTML tags, there is nothing in the language itself that is specific to client side programming. Everything related to the browser is in the DOM, not in the JavaScript language.

JavaScript 用于客户端脚本(这种用法几乎类似于客户端脚本),但将其标记为客户端语言会产生误导.该语言本身不包含浏览器集成这一事实使其很容易适应其他环境,包括服务器端脚本.

JavaScript is used in client side scripting (and that use is almost analogous to client side scripting), but branding it a client side language would be misleading. The fact that the language itself doesn't contain the browser integration has made it easy to adapt it to other environments, including server side scripting.

Node.js 远非唯一使用 JavaScript 的服务器端脚本.例如,ASP 提供 VBScript 和 JScript(Microsoft 的 JavaScript 实现)作为服务器端语言.此列表比较了 28 种不同的服务器端用途,而且还不止这些.

Node.js is far from the only server side scripting using JavaScript. ASP for example offered VBScript and JScript (Microsofts implementation of JavaScript) as server side languages. This list compares 28 different server side uses, and it's not all there is.

这篇关于是“Javascript"吗?也是服务器端语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆