1.在控制器引入:
public function actionList() {
Yii::app()->clientScript->registerScriptFile($this->baseUrl.'/js/ZeroClipboard.js');
$this->render('list', array(
{ //链接外部css文件
Yii::app()->clientScript->registerCssFile($this->baseUrl.'/css/calendar.css');
//外部引入js文件
Yii::app()->clientScript->registerScriptFile($this->baseUrl.'/js/calendar.js');
Yii::app()->clientScript->registerScriptFile($this->baseUrl.'/js/calendar-zh.js');
}
public function actionList() {
Yii::app()->clientScript->registerScriptFile($this->baseUrl.'/js/ZeroClipboard.js');
$this->render('list', array(
));
public function actionCreate(){ //链接外部css文件
Yii::app()->clientScript->registerCssFile($this->baseUrl.'/css/calendar.css');
//外部引入js文件
Yii::app()->clientScript->registerScriptFile($this->baseUrl.'/js/calendar.js');
Yii::app()->clientScript->registerScriptFile($this->baseUrl.'/js/calendar-zh.js');
}