开发者

where i must put my javascript functions for better performance, in app/views/layout/users_layout.ctp or in app/views/users/index.ctp file?

开发者 https://www.devze.com 2023-03-12 19:00 出处:网络
i am new cakephp ,so i want to know that where i could put javascript function in m cakephp? i am new cakephp ,so i want to know that where i could put javascript function in m cakephp?

i am new cakephp ,so i want to know that where i could put javascript function in m cakephp? i am new cakephp ,so i want to know that where i could put javascript function in m cakephp? i am new开发者_高级运维 cakephp ,so i want to know that where i could put javascript function in m cakephp? i am new cakephp ,so i want to know that where i could put javascript function in m cakephp? i am new cakephp ,so i want to know that where i could put javascript function in m cakephp? i am new cakephp ,so i want to know that where i could put javascript function in m cakephp? i am new cakephp ,so i want to know that where i could put javascript function in m cakephp?


Put your JS in an external file, like /app/webroot/js/yourjs.js then use the following in your layout;

<html>

  <head>
  <?php echo $this->Html->script('yourjs'); ?>
  </head>

  <body>
  </body>

</html>

Put your JS in an external file, like /app/webroot/js/yourjs.js then use the following in your layout;

<html>

  <head>
  <?php echo $this->Html->script('yourjs'); ?>
  </head>

  <body>
  </body>

</html>

Put your JS in an external file, like /app/webroot/js/yourjs.js then use the following in your layout;

<html>

  <head>
  <?php echo $this->Html->script('yourjs'); ?>
  </head>

  <body>
  </body>

</html>

etc..

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号