TD - 单选框 - RadioButton

基本方法

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);

  }
},

 

 

转载于:https://www.cnblogs.com/7q4w1e/p/9549345.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值