哪个是使用Javascript的更好方法? [英] Which Is The Better Approach To Working With Javascript?

查看:64
本文介绍了哪个是使用Javascript的更好方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



使用Javascript时哪种方法更好?


1.服务器端处理:Web服务器获取表单输入,将其运行到

Javascript模块,PHP收集文档准备的输出。


2.客户端处理:Web服务器获取表单输入并将其传递给PHP

其中包括以某种方式编写的Javascript,以便在客户端处理并在客户端处理(可能使用DOM函数

调用)表单输入

一边也是。


我发布了这个< news:Xn ****************** @ 216.168.3.44显然

少了被贩运的新闻组和帖子是TLDR类,但它有

背景和详细信息为什么代码必须在Javascript中以及为什么PHP

必须以某种方式使用它。它还提供了服务器的详细信息以及它如何分叉并与进程通信以解析/生成输出。

解决方案

Patient Guy写道:


使用Javascript时哪种方法更好?


1.服务器端处理:Web服务器获取表单输入,将其运行到

Javascript模块中,PHP收集文档准备的输出。


2.客户端处理:Web服务器获取表单输入并将其传递给PHP

,其中包括以某种方式编写的Javascript,以便在客户端处理并呈现表单输入

(可能使用DOM函数

也在那边打电话。


我发布了这个< news:Xn **************** **@216.168.3.44在一个显然较少被贩卖的新闻组中,该帖子是TLDR类型,但它有

背景和详细信息代码为何必须使用Javascript以及为什么PHP

必须以某种方式使用它。它还提供了服务器的详细信息以及它如何分叉并与流程进行通信以解析/生成输出。



3.尝试javascript新闻组。这个用于PHP。


提示:javascript不在服务器上运行。


-

==================

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================


Jerry Stuckle< js ******* @ attglobal.netwrote in comp.lang.php:


Patient Guy写道:


>使用Javascript时哪种方法更好?

1。服务器端处理:Web服务器获取表单输入,将其运行到Javascript模块中,PHP收集文档准备的输出。

2。客户端处理:Web服务器获取表单输入并将其传递给PHP,其中包括以在客户端处理并呈现(可能使用
DOM)
表单输入的方式编写的Javascript这方面的功能调用。

我发布了这个< news:Xn ****************** @ 216.168.3.44in an <显然较少被贩运的新闻组和帖子是TLDR类,但它有背景和详细信息为什么代码必须在Javascript中以及为什么PHP必须以某种方式使用它。它还提供了服务器的详细信息以及它如何分析和与
进程通信来解析/生成输出。



3.试一试javascript新闻组。这个适用于PHP。



所以,基于你的回复,你告诉我PHP处理实现没有进程间通信能力或者

与(Java)脚本解释器的接口。


>

提示:javascript不会在服务器。



服务器或服务器关联的进程可以启动脚本宿主,将某种形式的输入传递给它,以及脚本主机执行脚本

解释,而调用进程等待输出。


但是这是实现的,PHP(按设计?)没有脚本接口,基于

你的回复。


Patient Guy写道:


Jerry在comp.lang.php中stuckle< js ******* @ attglobal.netwrote:


> Patient Guy写道:


>>使用Javascript时哪种方法更好?

1。服务器端处理:Web服务器获取表单输入,将其运行到Javascript模块中,PHP收集文档准备的输出。

2。客户端处理:Web服务器获取表单输入并将其传递给PHP,其中包括以在客户端处理并呈现(可能使用
DOM)
表单输入的方式编写的Javascript这方面的功能调用。

我发布了这个< news:Xn ****************** @ 216.168.3.44in an <显然较少被贩运的新闻组和帖子是TLDR类,但它有背景和详细信息为什么代码必须在Javascript中以及为什么PHP必须以某种方式使用它。它还提供了服务器的详细信息以及它如何分析和与
进程通信以解析/生成输出。


3.尝试使用javascript新闻组。这个适用于PHP。



所以,根据您的回复,您告诉我PHP处理实现没有进程间通信能力或能力

与(Java)脚本解释器的接口。


>提示:javascript不在服务器上运行。



服务器或服务器关联的进程可以启动脚本宿主,将某种形式的输入传递给它,并且脚本主机执行脚本

解释,而调用进程等待输出。


但是这是实现的,PHP(按设计?)没有脚本接口,基于

回复。



这是正确的。 Javascript在客户端上运行。

之间的通信PHP和javascript是有限的。 PHP可以生成javascript代码,并且
javascript可以将数据提交给服务器以供PHP处理。


但是服务器上没有javascript解释器。那是

浏览器的工作。


-

=========== =======

删除x来自我的电子邮件地址

Jerry Stuckle

JDS计算机培训公司
js ******* @ attglobal.net

==================



Which is the better approach in working with Javascript?

1. Server side processing: Web server gets form input, runs it into the
Javascript module, and PHP collects the output for document prep.

2. Client side processing: Web server gets form input and passes it to PHP
which includes the Javascript written in a way to make the form input
processed on the client side and rendered (probably using DOM function
calls) on that side as well.

I posted this <news:Xn******************@216.168.3.44in an apparently
less trafficked newsgroup and the post was the TLDR kind, but it has the
background and details of why the code must be in Javascript and why PHP
must work with it somehow. It also gives the details of the server and how
it forks and communicates with processes to parse/generate output.

解决方案

Patient Guy wrote:

Which is the better approach in working with Javascript?

1. Server side processing: Web server gets form input, runs it into the
Javascript module, and PHP collects the output for document prep.

2. Client side processing: Web server gets form input and passes it to PHP
which includes the Javascript written in a way to make the form input
processed on the client side and rendered (probably using DOM function
calls) on that side as well.

I posted this <news:Xn******************@216.168.3.44in an apparently
less trafficked newsgroup and the post was the TLDR kind, but it has the
background and details of why the code must be in Javascript and why PHP
must work with it somehow. It also gives the details of the server and how
it forks and communicates with processes to parse/generate output.

3. Try a javascript newsgroup. This one is for PHP.

Hint: javascript does NOT run on the server.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


Jerry Stuckle <js*******@attglobal.netwrote in comp.lang.php:

Patient Guy wrote:

>Which is the better approach in working with Javascript?

1. Server side processing: Web server gets form input, runs it into
the Javascript module, and PHP collects the output for document prep.

2. Client side processing: Web server gets form input and passes it
to PHP which includes the Javascript written in a way to make the
form input processed on the client side and rendered (probably using
DOM function calls) on that side as well.

I posted this <news:Xn******************@216.168.3.44in an
apparently less trafficked newsgroup and the post was the TLDR kind,
but it has the background and details of why the code must be in
Javascript and why PHP must work with it somehow. It also gives the
details of the server and how it forks and communicates with
processes to parse/generate output.


3. Try a javascript newsgroup. This one is for PHP.

So, based on your response, you are telling me that a PHP processing
implementation has no interprocess communication capability, or ability to
interface with a (Java)script interpreter.

>
Hint: javascript does NOT run on the server.

A server, or a server-associated process, can start a script host, passing
some form of input to it, and the script host does the script
interpretation, while the calling process waits for output.

However this is achieved, PHP (by design?) has no script interface, based
on your response.


Patient Guy wrote:

Jerry Stuckle <js*******@attglobal.netwrote in comp.lang.php:

>Patient Guy wrote:

>>Which is the better approach in working with Javascript?

1. Server side processing: Web server gets form input, runs it into
the Javascript module, and PHP collects the output for document prep.

2. Client side processing: Web server gets form input and passes it
to PHP which includes the Javascript written in a way to make the
form input processed on the client side and rendered (probably using
DOM function calls) on that side as well.

I posted this <news:Xn******************@216.168.3.44in an
apparently less trafficked newsgroup and the post was the TLDR kind,
but it has the background and details of why the code must be in
Javascript and why PHP must work with it somehow. It also gives the
details of the server and how it forks and communicates with
processes to parse/generate output.

3. Try a javascript newsgroup. This one is for PHP.


So, based on your response, you are telling me that a PHP processing
implementation has no interprocess communication capability, or ability to
interface with a (Java)script interpreter.

>Hint: javascript does NOT run on the server.


A server, or a server-associated process, can start a script host, passing
some form of input to it, and the script host does the script
interpretation, while the calling process waits for output.

However this is achieved, PHP (by design?) has no script interface, based
on your response.

That is correct. Javascript runs on the client. Communications between
PHP and javascript is limited. PHP can generate javascript code, and
javascript can submit data to the server for PHP to process.

But there is no javascript interpreter on the server. That is the
browser''s job.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================


这篇关于哪个是使用Javascript的更好方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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