上的事情,我想呈現在我看來,一些JavaScript文件,我可以用下面的代碼的Yii:JavaScript文件我使不這樣做我
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl . '/protected/components/js/ForCreatePage.js',CClientScript::POS_HEAD);
Yii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl . '/protected/components/js/createPageReady.js',CClientScript::POS_READY);
使其但是,當我嘗試使用的功能,從它或使用現成的文件,代碼沒有做任何事情
部分文件 ForCreatePage:
function link_to_generated(data) {
alert($(data).find('ff_result').text());
}
createPageReady:
(function() {
amount_of_pages = 1;
$("#for-movie").css('width',(($('#for-movie-container-2').width()-10)+'px'));
... // more code inside the file
});
你得到的控制檯上的錯誤?你能看到正在加載網絡選項卡中的文件嗎? – jribeiro
不,沒有看到有什麼 – userTom