Can I use php in javascript?

后端 未结 7 450
萌比男神i
萌比男神i 2021-01-25 23:49

Begginer\'s question.

Can I use PHP in javascript?

For example in jquery,

...
...
triggers.eq(1).post(\'

        
7条回答
  •  余生分开走
    2021-01-26 00:12

    PHP is executed on the server side and JavaScript on the client side. But you can print the PHP variable like this:

    triggers.eq(1).post();
    

    And then the output is like:

    triggers.eq(1).post('admin/categories/delete/12345');
    

提交回复
热议问题