Serverside和客户端javascript [英] Serverside and clientside javascript

查看:96
本文介绍了Serverside和客户端javascript的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

服务器端是否存在javascript,如果是,是否有可能客户端javascript与服务器端javascript交互?

Does serverside javascript exist, if yes, is it possible to clientside javascript to interact with serverside javascript?

例如,客户端javascript是否可以从serverside javascript返回存储在服务器上的json文件的一部分,而不下载整个json文件?

For example, is it possible for clientside javascript to request from the serverside javascript to return part of a json file which is stored on the server without downloading the whole json file?

我知道我可以用其他服务器端语言来做这个aspx,php等等,但是想知道服务器端javascript是否存在以及它是否可以用json文件做类似的事情?

I understand that I can do this with other serverside languages like aspx, php etc etc, but wanted to know if serverside javascript exists and if it can do something similar with json files?

推荐答案


服务器端javascript是否存在

Does serverside javascript exist

http://en.wikipedia.org/wiki/Comparison_of_server-side_JavaScript_solutions

Node.js 是当前流行的方式。


如果是,是否有可能客户端javascript与服务器端javascript交互?

if yes, is it possible to clientside javascript to interact with serverside javascript?

是。在WWW的上下文中,这通常与完成与服务器端程序的任何其他通信相同:通过发出HTTP请求(通常通过XMLHttpRequest)。

Yes. In the context of the WWW, this is usually done the same way that any other communication with server side programs is done: By making HTTP requests (usually via XMLHttpRequest).


例如,客户端javascript是否可以从服务器端javascript请求返回存储在服务器上的json文件的一部分而不下载整个json文件?

For example, is it possible for clientside javascript to request from the serverside javascript to return part of a json file which is stored on the server without downloading the whole json file?

我知道我可以用其他服务器端语言(如aspx,php等)来做这件事,但是想知道服务器端javascript是否存在以及它是否可以用json文件做类似的事情?

I understand that I can do this with other serverside languages like aspx, php etc etc, but wanted to know if serverside javascript exists and if it can do something similar with json files?

JavaScript是一种编程语言。它可以在服务器上做或多或少的任何其他语言可以做的事情。

JavaScript is a programming language. It can do more or less anything on the server that any other language can do.

这篇关于Serverside和客户端javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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