<small id='3VIRF'></small><noframes id='3VIRF'>

      <i id='3VIRF'><tr id='3VIRF'><dt id='3VIRF'><q id='3VIRF'><span id='3VIRF'><b id='3VIRF'><form id='3VIRF'><ins id='3VIRF'></ins><ul id='3VIRF'></ul><sub id='3VIRF'></sub></form><legend id='3VIRF'></legend><bdo id='3VIRF'><pre id='3VIRF'><center id='3VIRF'></center></pre></bdo></b><th id='3VIRF'></th></span></q></dt></tr></i><div id='3VIRF'><tfoot id='3VIRF'></tfoot><dl id='3VIRF'><fieldset id='3VIRF'></fieldset></dl></div>
      <legend id='3VIRF'><style id='3VIRF'><dir id='3VIRF'><q id='3VIRF'></q></dir></style></legend>
    1. <tfoot id='3VIRF'></tfoot>

        • <bdo id='3VIRF'></bdo><ul id='3VIRF'></ul>

        在 Yii 2.0 中添加 jquery

        时间:2023-10-15
          <bdo id='IHEkj'></bdo><ul id='IHEkj'></ul>

              <tbody id='IHEkj'></tbody>
              <tfoot id='IHEkj'></tfoot>
              <i id='IHEkj'><tr id='IHEkj'><dt id='IHEkj'><q id='IHEkj'><span id='IHEkj'><b id='IHEkj'><form id='IHEkj'><ins id='IHEkj'></ins><ul id='IHEkj'></ul><sub id='IHEkj'></sub></form><legend id='IHEkj'></legend><bdo id='IHEkj'><pre id='IHEkj'><center id='IHEkj'></center></pre></bdo></b><th id='IHEkj'></th></span></q></dt></tr></i><div id='IHEkj'><tfoot id='IHEkj'></tfoot><dl id='IHEkj'><fieldset id='IHEkj'></fieldset></dl></div>

              <small id='IHEkj'></small><noframes id='IHEkj'>

              1. <legend id='IHEkj'><style id='IHEkj'><dir id='IHEkj'><q id='IHEkj'></q></dir></style></legend>
                  本文介绍了在 Yii 2.0 中添加 jquery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  如何在 Yii 2.0 中将 jQuery 添加到我的页面?

                  How can i add jQuery to my page in Yii 2.0?

                  在 Yii 1.x 中你可以使用:

                  In Yii 1.x you could just use:

                  Yii::app()->clientScript->registerCoreScript('jquery');
                  

                  我已经尝试用我自己的 View 类覆盖并尝试在那里注册 jQuery,但它没有显示在我的 html 页面中:

                  I already tried to override the View class with my own and tried to register jQuery there, but it doesn't shows up in my html page:

                  namespace frontendcomponents;
                  
                  /**
                   * This is the base view object, it extends the yiiwebView so you can add custom view stuff here.
                   */
                  
                  class BaseView extends yiiwebView {
                  
                  
                      public function init()
                      {
                  
                          parent::init();
                          yiiwebJqueryAsset::register($this);
                  
                      }
                  
                  
                  }
                  

                  推荐答案

                  已解决!我忘了把视图方法放在我的视图文件中:($this->beginBody() 等等)

                  Solved! I forgot to put the view methods in my view file: ($this->beginBody() and so on)

                  这篇关于在 Yii 2.0 中添加 jquery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Yii2 DropDownList Onchange 更改自动完成小部件“源"属性? 下一篇:如何在yii2中实现单一搜索表单

                  相关文章

                1. <small id='SPbk3'></small><noframes id='SPbk3'>

                      <tfoot id='SPbk3'></tfoot>
                    1. <legend id='SPbk3'><style id='SPbk3'><dir id='SPbk3'><q id='SPbk3'></q></dir></style></legend>

                        <bdo id='SPbk3'></bdo><ul id='SPbk3'></ul>

                      <i id='SPbk3'><tr id='SPbk3'><dt id='SPbk3'><q id='SPbk3'><span id='SPbk3'><b id='SPbk3'><form id='SPbk3'><ins id='SPbk3'></ins><ul id='SPbk3'></ul><sub id='SPbk3'></sub></form><legend id='SPbk3'></legend><bdo id='SPbk3'><pre id='SPbk3'><center id='SPbk3'></center></pre></bdo></b><th id='SPbk3'></th></span></q></dt></tr></i><div id='SPbk3'><tfoot id='SPbk3'></tfoot><dl id='SPbk3'><fieldset id='SPbk3'></fieldset></dl></div>