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

初学者求教php调用javascript问题

WBOY
WBOYOriginal
2016-06-23 14:05:21962browse

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


回复讨论(解决方案)

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

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

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

Statement:
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