Javascript执行PHP [英] Javascript execute PHP

查看:72
本文介绍了Javascript执行PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有谁知道如何使用javascript执行PHP函数..

我想要的是在下面这行:

< a href =" ;"目标= QUOT; _blank"的onClick = QUOT;< ;? add_product_category(); ?>" >添加

类别< / a>


或者通过调用javascript或者如上所述进行内联。


谢谢!!

Does anyone knows how to execute a PHP function using javascript..
What I want is to do that in the line bellow:
<a href="" target="_blank" onClick="<? add_product_category(); ?>" >add
Category</a>

either by calling a javascript or doing it inline as above.

Thanks !!

推荐答案

Angelos于2005年7月4日在comp.lang.javascript中写道
Angelos wrote on 04 jul 2005 in comp.lang.javascript:
有没有人知道如何使用javascript执行PHP函数..
我想要的是在下面这一行:
< a href =""目标= QUOT; _blank"的onClick = QUOT;< ;? add_product_category(); ?>"
Does anyone knows how to execute a PHP function using javascript..
What I want is to do that in the line bellow:
<a href="" target="_blank" onClick="<? add_product_category(); ?>"
添加类别< / a>
add Category</a>



通过调用javascript或按上述方式内联执行。



either by calling a javascript or doing it inline as above.




你不能。服务器端代码在客户端开始运行后完成。


-

Evertjan。

荷兰。

(请在我的电子邮件地址中将x'变为点数)



you cannot. serverside code is finished once the client comes into action.

--
Evertjan.
The Netherlands.
(Please change the x''es to dots in my emailaddress)


Angelos写道:
Angelos wrote:
有谁知道如何执行一个使用javascript的PHP函数..
我想要的是在下面这一行:
< a href =""目标= QUOT; _blank"的onClick = QUOT;< ;? add_product_category(); ?>" >添加
类别< / a>

通过调用javascript或如上所述进行内联。

谢谢!!
Does anyone knows how to execute a PHP function using javascript..
What I want is to do that in the line bellow:
<a href="" target="_blank" onClick="<? add_product_category(); ?>" >add
Category</a>

either by calling a javascript or doing it inline as above.

Thanks !!




http://groups.google.com/groups/comp.lang.javascript


查看常见问题解答#4.34
http://www.jibbering.com/faq/#FAQ4_34


和Jim的介绍相关联,
http://jibbering.com/2002/4/httprequest.html



Search the group archives at
http://groups.google.com/groups/comp.lang.javascript

Check out FAQ#4.34 at
http://www.jibbering.com/faq/#FAQ4_34

And Jim''s intro linked therefrom, to
http://jibbering.com/2002/4/httprequest.html





嗯,客户端获取服务器所服务的内容,服务器解析页面中的任何

代码,完成后,它会将stdout发送给客户端,通常是

页。现在,js不能通过

线对服务器上的php进行单函数调用,它可以通过


Well, the client gets what the server serves, the server parses out any
code in the page, when done, it sends the stdout to the client, usually a
page. Now, js can''t make a single-function call to php on server over the
wire, it can call a .php with some arguments over the

上的一些参数调用.php


这篇关于Javascript执行PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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