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..
精彩评论