Rumah > Artikel > pembangunan bahagian belakang > Yii框架中使用jquery的有关问题
Yii框架中使用jquery的问题!
Yii框架下的protected/views/site/index.php,一个非常简单的页面
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <?php Yii::app()->clientScript->registerCoreScript(Yii::app()->request->baseUrl.'/protected/views/site/jquery.js'); Yii::app()->clientScript->registerCoreScript(Yii::app()->request->baseUrl.'/protected/views/site/1.js'); ?> <p>123</p> <button>hide</button>
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="1.js"></script> <p>123</p> <button>hide</button>