yii 如何在底部加载js

<?php 
//在开始加载
Yii::app()->clientScript->coreScriptPosition = CClientScript::POS_BEGIN;
//这些不加载
Yii::app()->clientScript->scriptMap=array('jquery.js'=>false,'jquery.min.js'=>false);

//在底部加载自定义JS
Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . "/js/test.js",CClientScript::POS_END); 
?>
 

你可能感兴趣的:(PHP,yii)