Home > Backend Development > PHP Tutorial > js里写php代码解决方法

js里写php代码解决方法

WBOY
Release: 2016-06-13 12:27:14
Original
2175 people have browsed it

js里写php代码

<br />common.js<br />function goUrl(lang){<br />...<br />//   $_SESSION['language']=lang   这句代码在js里要怎么写?<br />...<br />}<br />
Copy after login

------解决思路----------------------
改变语言后,页面需要刷新,你原来的写法并不需要改变
你的 goUrl.php 总还是要像  index.php 那样输出页面内容的。不显得累赘吗?

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