How to pass php variable's value to jquery

前端 未结 4 746
被撕碎了的回忆
被撕碎了的回忆 2020-12-24 13:19

I have a php variable:

$name_of_current_page

which I have available in my view, and I want to make the value available to jquery. Is the be

4条回答
  •  猫巷女王i
    2020-12-24 13:52

    First at all, that you ask, is a normal way on fill client side code, but this one will be load at the page load, if you want to run it on live once the page is loaded, you must use ajax, cause is the way on how you will comunicate with the server side scripts, is no possible jquery or javascript load the php vars on live once the page have been loaded

提交回复
热议问题