How to define a variable in JavaScript with PHP echo function?

前端 未结 7 1368
囚心锁ツ
囚心锁ツ 2020-12-18 13:33

How do I define a variable in javascript with echo function, from the external php file?

We have theconfigfile.php, thejsfile.js an

7条回答
  •  萌比男神i
    2020-12-18 14:11

    You can put values in such way only into the files which are processed by PHP.
    External JavaScript-files are not processed by PHP so they are linked as is without sustitution.

提交回复
热议问题