Home  >  Article  >  Backend Development  >  请问JS参数怎么赋给PHP ?

请问JS参数怎么赋给PHP ?

WBOY
WBOYOriginal
2016-06-13 11:05:48742browse

请教JS参数如何赋给PHP ??

<br /><br />function getSig(openid,openkey,url,pf){<br />  <br /> var sigStr="<?php echo get_sig('"+openid+"','"+openkey+"','"+url+"','"+pf+"') ?>";<br /><br />}<br />


getSig括号里的参数如何赋给PHP的get_sig ? 
我里面怎么写都不行。。请教方法
------解决方案--------------------
php是在服务器端执行完才把页面返回到浏览器执行js,js里的参数没有办法直接赋值到php里面。
只能发ajax请求。

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