开发者

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?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜