zoukankan      html  css  js  c++  java
  • TD

    基本方法

    Html - 默认选中

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

    <input dojoType="bootstrap.form.RadioButton" value="1" checked="true" dojoAttachPoint="chkAreaAndDeptType">

    Js - 取值

    值为true,即为选中

    var chkDeptType = this.chkDeptType.attr("checked");

    if (this.RbtnUserAll.checked == true){}

    Js - 设置为选中

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

    this.RbtnUserAll.attr("value",true);

    模板

    模板1:

    Html - 相同的name,只会有一个被选中

    <!-- 设备 -->

    <input dojoType="bootstrap.form.RadioButton" value="1" checked="true" dojoAttachPoint="equipmentBox" name="associationTypes"> ${nls.EQUIPMENT}

    <!-- 交通设施 -->

    <input dojoType="bootstrap.form.RadioButton" value="0" dojoAttachPoint="facilityBox" name="associationTypes"> ${nls.TRAFFIC_FACILITY}

    JS

    this.connects.push(dojo.connect(this.equipmentBox, "onChange", this, this.onChange_btnStart));

    onChange_btnStart:function(){

      if(this.btnStart.checked){

        this.edtUrl.attr("disabled", false);

        this.btnSyncUser.attr("disabled", false);

      }else{

        this.edtUrl.attr("disabled", true);

        this.btnSyncUser.attr("disabled", true);

      }
    },

     

  • 相关阅读:
    django2自动发现项目中的url
    Python中的__name__
    阻塞与非阻塞、同步与异步、I/O模型
    Python中的关键字的用法
    元类
    数据库介绍
    django+nginx+uwsgi 项目部署
    centos7安装mysql5.6
    MySQL5.7的新特性
    Python进行MySQL数据库操作
  • 原文地址:https://www.cnblogs.com/7q4w1e/p/9549345.html
Copyright © 2011-2022 走看看