TP内置标签使用选择

浏览:1977 发布日期:2015/01/30 分类:求助交流
控制器:$type=array(1,2,4);
$this->assign('type',$type);
$this->display();
模板为以下:<input type="checkbox"  name="type[]" id="type"  value="1"   />值1
                        
<input type="checkbox"  name="type[]" id="type"  value="2"  />值2 
                        
<input type="checkbox"  name="type[]" id="type"  value="3"  />值3
                        
<input type="checkbox"  name="type[]" id="type"  value="4" />值4
                        
<input type="checkbox"  name="type[]" id="type"  value="5" />值5
对上面checkbox 加selected选中,用TP内置的标签哪个啊,in? eq? 手册不推荐使用if
最佳答案
评论( 相关
后面还有条评论,点击查看>>