Yii错误无法读取undefined的属性'submitForm'

时间:2016-07-06 07:29:24

标签: javascript php yii

我是Yii的新手,当我点击我的提交按钮时收到错误“Uncaught TypeError:无法读取未定义的属性'submitForm'” 这是我的代码

查看页面

<?php echo CHtml::beginForm(); ?>

        <div class="search">
            <div class="form-group">
            <?php echo CHtml::textField('search','',
                        array('placeholder'=>'Search Your products')); ?>
                <!--<input type="text" placeholder="Search Your products"/>-->
            </div>

            <div class="form-group">
            <?php 
                $options = array();
                    foreach ($model as $user) :
                        $options[] = $user[0];

                    endforeach;

                echo CHtml::dropDownList('mySelect', '12', $options);


            ?>
                <!--<select>
                    <option>Option One</option>
                    <option>Option Two</option>
                    <option>Option Three</option>
                    <option>Option Four</option>
                    <option>Option Five</option>
                </select>-->
            </div>

             <div class="form-group_new">
             <?php 
                echo CHtml::button('SEARCH YOUR PRODUCT', array('submit'=>array('Product/index'),'class'=>'search-bttn','placeholder'=>'Search')); 

             ?>
                <!--<input type="submit" placeholder="Search" value="SEARCH YOUR PRODUCT" class="search-bttn"/>-->
            </div>
        </div>

        <?php echo CHtml::endForm(); ?>

当我运行时,除了显示错误之外没有任何事情发生。任何人都可以帮我这个???等待回复..

1 个答案:

答案 0 :(得分:0)

原谅英语,你需要添加jquery Yii jquery.yii.js