Is it okay to use PHP inside a jQuery script?

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

For example:

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


        
7条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-20 04:35

    Sure, as long as you keep in mind that PHP code will be executed by the server before the page is sent out. Other than that, have fun.

提交回复
热议问题