Calling PHP Function within Javascript

前端 未结 5 1709
有刺的猬
有刺的猬 2020-12-11 19:22

I want to know is it possible to call a php function within javascript, only and only when a condition is true. For example



        
5条回答
  •  时光说笑
    2020-12-11 19:28

    PHP is server side and Javascript is client so not really (yes I know there is some server side JS). What you could do is use Ajax and make a call to a PHP page to get some results.

提交回复
热议问题