Home > Backend Development > PHP Tutorial > 菜鸟求教php调用javascript有关问题

菜鸟求教php调用javascript有关问题

WBOY
Release: 2016-06-13 12:48:35
Original
704 people have browsed it

初学者求教php调用javascript问题
php文件a.php()中通过button的onclick调用js的function,假设function是f(),f()有返回值,现在我需要根据该返回值修改a.php()中的相关变量,请问如何实现?


------解决方案--------------------
php 运行于服务器端,js 运行于客户端
也就是说 php 先于 js 运行

你自己想一下,如何去调用未来呢?
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template