╃巡洋艦㊣
- ╃巡洋艦㊣ 回复了话题 Discuz数据字典
很好,学习了!
- ╃巡洋艦㊣ 回复了话题 关于rules的场景
如果rules里没有指定场景,那样在任何动作都是可用的。
- ╃巡洋艦㊣ 回复了话题 关于rules的场景
$model->scenario = 'xxx';
- ╃巡洋艦㊣ 回复了话题 我写的一个简单的跳转按钮代码
鸟鸟V5
那肯定不行,写全路径。
application.extensions.yiiext.behaviors.model.trees.*
应该是
/index.php?r=frontend/default/index
对啊。楼上说的没错!
- ╃巡洋艦㊣ 回复了话题 这段AJAX代码是什么含义?大家帮看看
public static function ajax($options) { Yii::app()->getClientScript()->registerCoreScript('jquery'); if(!isset($options['url'])) $options['url']='js:location.href'; else $options['url']=self::normalizeUrl($options['url']); if(!isset($options['cache'])) $options['cache']=false; if(!isset($options['data']) && isset($options['type'])) $options['data']='js:jQuery(this).parents("form").serialize()'; foreach(array('beforeSend','complete','error','success') as $name) { if(isset($options[$name]) && strpos($options[$name],'js:')!==0) $options[$name]='js:'.$options[$name]; } if(isset($options['update'])) { if(!isset($options['success'])) $options['success']='js:function(html){jQuery("'.$options['update'].'").html(html)}'; //这里是update产生的js代码。 unset($options['update']); } if(isset($options['replace'])) { if(!isset($options['success'])) $options['success']='js:function(html){jQuery("'.$options['replace'].'").replaceWith(html)}'; unset($options['replace']); } return 'jQuery.ajax('.CJavaScript::encode($options).');'; }