Is it okay to use PHP inside a jQuery script?

前端 未结 7 1457
误落风尘
误落风尘 2021-02-20 03:56

For example:

$(document).ready(function(){
    $(\'.selector\').click(function(){
        
    });
});
         


        
7条回答
  •  说谎
    说谎 (楼主)
    2021-02-20 04:28

    No it's not. Just as long as you know that the JS is executed after the PHP page is parsed.

提交回复
热议问题