模板

模板1:TD

//Html - checked="true" 默认选中

<input dojoType="bootstrap.form.CheckBox" checked="true" dojoAttachPoint="assetsIdBox">

Js:

//绑定修改事件

this.connects.push(dojo.connect(this.isIntelligent, "onChange", this, this.onChange_isIntelligent));

onChange_isIntelligent: function(){

if (this.isIntelligent.checked){//选中}else{//未选中}

}

//设置为选中

this.browseVideoBox.attr("checked", true);

//设置为不选中

this.browseVideoBox.attr("checked", false);

模板2:动态建立

var checkBox = new bootstrap.form.CheckBox({});

checkBox.id = json[i].id;

checkBox.caption = json[i].caption;

this.divLogType.appendChild(checkBox.domNode);

this.divLogType.appendChild(document.createTextNode(json[i].caption + " "));

模板3:动态建立 - 每行5个

html

<div class="row">
  <div class="col-lg-12" dojoAttachPoint="divLogType"></div>
</div>

js

var table = document.createElement("table");
this.divLogType.appendChild(table);
var tr = null;
var td = null;
dojo.forEach(json, dojo.hitch(this, function(item, idx){
  if (Math.floor(idx / 5) * 5 == idx) {
    tr = table.insertRow(-1); //兼容IE6
  }
  td = document.createElement("td");
  td.setAttribute("width", "200px");
  tr.appendChild(td);

  var checkBox = new bootstrap.form.CheckBox({});
  checkBox.logTypeId = item.id;
  checkBox.logTypeCaption = item.caption;
  td.appendChild(checkBox.domNode);
  td.appendChild(document.createTextNode(item.caption + " "));
}));

最新文章

  1. Shell_1 简介
  2. [UE4][Custom Animation Graph Node]Evaluate Pose by Curve
  3. 【Alpha阶段】第一次线上会议
  4. 【mongo】Can&#39;t take a write lock while out of disk space错误
  5. A Simple C++ Template Class that Matches a String to a Wildcard Pattern
  6. 淘宝初始化css代码
  7. 继承多态绕点 C#篇
  8. JS代码实现网站设为首页加入收藏功能
  9. [Java] 匿名内部类
  10. C#操作word封装
  11. 高级I/O函数(3)-tee、fcntl函数
  12. jQuery图片提示示例
  13. ms_celeb_1m数据提取(MsCelebV1-Faces-Aligned.tsv)python脚本
  14. Hadoop(九)Hadoop IO之Compression和Codecs
  15. 初探arch -小白安装arch篇
  16. Java当中的IO三
  17. Windows&#160;批处理获取某路径下最新创建的文件的名称
  18. collections, time, queue的应用
  19. CentOS7+Nginx设置Systemctl restart nginx.service服务
  20. Math类的学习 java 类库 API 文档学习

热门文章

  1. Mysql基础04-查询
  2. Linux systemctl系统工具常用总结(详)
  3. Qt文件发布
  4. Vulnerable Kerbals CodeForces - 772C【拓展欧几里得建图+DAG上求最长路】
  5. 【读书笔记】自然语言处理综述 -- 第四章 -- N元语法
  6. Centos安装步骤
  7. Xamarin.Forms登录对话框及表单验证
  8. Python3标准库:collections容器数据类型
  9. C#实例之简单聊天室(状态管理)
  10. BZOJ 4247: 挂饰 动态规划