easyUI,select控制tr列的radio显示

easyUI,select控制tr列的radio显示

easyUI,select控制tr列的radio显示

<tr>
    <td>输入类型:</td>
    <td><select id="selectOptionAdd" class="easyui-combobox" name="inputType" editable="false">
        <option id="option" value="1" selected="selected">text</option>
        <option id="option" value="2">checkbox</option>
        <option id="option" value="3">select</option>
        <option id="option" value="4">textarea</option>
    </select></td>
</tr>
<tr id="trAdd" style="display: none">
    <td style="text-align:right">自定义:</td>
    <td>
        <span class="radioSpan">
            <input type="radio" name="customizable" value="1" id="radio3"><label for="radio3">是</label></input>
            <input type="radio" name="customizable" value="2" id="radio4"><label for="radio4">否</label></input>
        </span>
    </td>
</tr>

<script type="text/javascript">
//添加属性   选择输入类型select, 操作是否可自定义
$('#selectOptionAdd').combobox({  
    onChange:function(newValue,oldValue){  
        if(newValue==2 || newValue==3){
            $("#trAdd").show(); 
        }else{
            $("#trAdd").hide(); 
        }
    }
}); 
</script>

转载于:https://my.oschina.net/longcnway/blog/689926