zoukankan      html  css  js  c++  java
  • TD

    模板

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

  • 相关阅读:
    python3.5 安装mysqlclient
    python mysqlclient安装失败 Command "python setup.py egg_info" failed with error code 1
    python mysqlclient安装失败 Command "python setup.py egg_info" failed with error code 1
    JUC-多线程锁
    JUC-线程间通信
    JUC-LOCK接口
    JUC-JUC是什么?
    Zookeeper
    Mac 安装IDEA 2018.3 版本
    MyISAM和innoDB
  • 原文地址:https://www.cnblogs.com/7q4w1e/p/9549353.html
Copyright © 2011-2022 走看看