作者:琪琪格 | 来源:互联网 | 2023-07-15 15:52
默认 选中
主要是在 html 加入 checked
<td style="width:65px;">创建时间:td>
<td><input id="switch_date_entered" class="easyui-switchbutton" style="width:60px;height:26px" onText="部分" offText="全部" checked /> td>

在 js 中判断 switch_date_entered 是否是 选中 状态
var switch_date_entered= $("#switch_date_entered").switchbutton("options").checked;
switch_date_entered 得到的 值是 true 或 false