模板

模板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 + " "));
}));

TD - 多选框 - CheckBox的更多相关文章

  1. 转发!HTML 复选框 checkbox 的 JavaScript 的全选和全反选

    checkbox 或者按钮实现 form 内的 checkbox 全选或者反选,代码很简单,全部代码如下: <html> <head> <meta http-equiv= ...

  2. css3美化复选框checkbox

     两种美化效果如下图: 代码(html) <div id="main"> <h2 class="top_title">使用CSS3美化复 ...

  3. [原创]纯JS实现网页中多选复选框checkbox和单选radio的美化效果

    图片素材: 最终效果图: <html><title> 纯JS实现网页中多选复选框checkbox和单选radio的美化效果</title><head>& ...

  4. 复选框(checkbox)、单选框(radiobox)的使用

    复选框(checkbox).单选框(radiobox)的使用 复选框: HTML: // 复选框 <input type="checkbox" name="chec ...

  5. php 判断复选框checkbox是否被选中

    php 判断复选框checkbox是否被选中   复选框checkbox在php表单提交中经常被使用到,本文章通过实例向大家介绍php如何判断复选框checkbox中的值是否被选中,需要的朋友可以参考 ...

  6. jquery判断复选框checkbox是否被选中

    jquery判断复选框checkbox是否被选中 使用is方法 //如果选中返回true //如果未选中返回false .is(':checked');

  7. 3.Android之单选按钮RadioGroup和复选框Checkbox学习

    单选按钮和复选框在实际中经常看到,今天就简单梳理下. 首先,我们在工具中拖进单选按钮RadioGroup和复选框Checkbox,如图: xml对应的源码: <?xml version=&quo ...

  8. Jquery操作复选框(CheckBox)的取值赋值实现代码

    赋值 复选框 CheckBox 遍历 取值  1. 获取单个checkbox选中项(三种写法): $("input:checkbox:checked").val() 或者 $(&q ...

  9. 使用CSS3美化复选框checkbox

    我们知道HTML默认的复选框样式十分简陋,而以图片代替复选框的美化方式会给页面表单的处理带来麻烦,那么本文将结合实例带您一起了解一下使用CSS3将复选框checkbox进行样式美化,并且带上超酷的滑动 ...

随机推荐

  1. Count the Colors ZOJ - 1610 区间颜色覆盖

    #include<stdio.h> #include<iostream> #include<string.h> #include<algorithm> ...

  2. Redis的各个数据的类型基本命令

    什么是Redis: 概念: Redis (REmote DIctionary Server) 是用 C 语言开发的一个开源的高性能键值对(key-value)数据库. 特征:1. 数据间没有必然的关联 ...

  3. [NOI2003]文本编辑器 [Fhq Treap]

    [NOI2003]文本编辑器 没啥好说的 就是个板子 #include <bits/stdc++.h> // #define int long long #define rep(a , b ...

  4. LTC

    LTC 即 L2C,Leads To Cash,从线索到现金的企业运营管理思想,是以企业的营销和研发两大运营核心为主线,贯穿企业运营全部流程,深度融合了移动互联.SaaS技术.大数据与企业运营智慧,旨 ...

  5. Java第二节课总结

    Java的基本运行单位是类.类由数据成员和函数成员组成.变量的类型之间可以相互转换.String是一个类.static代表静态变量. 运行结果: false                false  ...

  6. iframe刷新另一个iframe

    如果是程序: Response.Write("<script language=javascript>");                Response.Write ...

  7. IDEA 找不到包或者找不到符号的一些解决办法

    有时使用IDE导入项目后,启动时会发生找不到包或者找不到符号的情况,下面有一些处理方法 1.右键项目Maven→Reimport 2.IDEA窗口左上角File→Invalidate and Rest ...

  8. Android View框架的draw机制

    概述 Android中View框架的工作机制中,主要有三个过程: 1.View树的测量(measure) Android View框架的measure机制 2.View树的布局(layout)Andr ...

  9. Nginx proxy_cache 缓存静态文件

    原文链接:https://blog.csdn.net/bjgaocp/article/details/87867521 创建缓存目录mkdir /tmp/ngx_cache 添加下面语句在http{ ...

  10. python 元组 列表 字典

    type()查看类型 //取整除 **幂 成员运算符: in  x在y序列中,就返回true 反之  not in 身份运算符: is is not 逻辑运算符 and or not 字符编码 问题 ...