Home > Backend Development > PHP Tutorial > 初学者求教php调用javascript问题

初学者求教php调用javascript问题

WBOY
Release: 2016-06-23 14:05:21
Original
981 people have browsed it

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


回复讨论(解决方案)

php 运行于服务器端,js 运行于客户端
也就是说 php 先于 js 运行

你自己想一下,如何去调用未来呢?

想通了,就是总觉得用起来不爽

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