Is it possible to pass GET or POST variable to external javascript

后端 未结 4 1084
广开言路
广开言路 2021-01-26 08:08

I am wondering whether is it possible to pass any variable to external java-script file

For example

I have this

4条回答
  •  悲哀的现实
    2021-01-26 08:30

    
     
    

    Now in gallery.js, the value of the PHP variable $x can be accessed using the JavaScript variable x. Make sure to generate syntactically correct JavaScript.

提交回复
热议问题