how to execute php code within javascript

前端 未结 8 1840
無奈伤痛
無奈伤痛 2020-11-30 03:47



        
8条回答
  •  甜味超标
    2020-11-30 04:19

    You can't run PHP with javascript. JavaScript is a client side technology (runs in the users browser) and PHP is a server side technology (run on the server).

    If you want to do this you have to make an ajax request to a PHP script and have that return the results you are looking for.

    Why do you want to do this?

提交回复
热议问题