首页 新闻 会员 周边

关于bootstrap validate的问题

0
悬赏园豆:30 [已关闭问题] 关闭于 2016-12-22 11:32

我在html文件里根据人员权限从后台获取到的信息,然后根据类型生成单选或者输入框,我怎么用bootstrap validate 进行验证呢

 

 

复制代码
 if(pojo.contentType){
                       //单选框
                       if(pojo.contentType.split('-')[0] == '1'){
                           var radioValues = pojo.contentType.split('-')[1].split(';');
                          
                           for(var i=0;i<radioValues.length;i++){
                              html += '<div class="radio">'; 
                              
                              html += '<label>'+
                                     '<input type="radio" class="content" required="true" name="'+pojo.id+'"  value="'+radioValues[i]+'"/>'+radioValues[i]+
                                    '</label>';
                                  
                              html += '</div>'; 
                           }
                          
                        }
                     }
else  {
      }
html += '</div>';
        //备注
        html += '<div class="col-xs-4">'+
         '<div class="input-group">'+
              '<span class="input-group-addon">备注</span>'+
             '<input type="text" name="2_r"  class="form-control   remark  " placeholder="true" >'+
              
          '</div>'+
        '</div>';
复制代码
幻月月的主页 幻月月 | 菜鸟二级 | 园豆:202
提问于:2016-12-22 11:16
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册