对于我的一生,我无法将我的 CheckBox 设置为在页面加载时选中。我尝试在 id 之后添加 value="true"
和 Checked="checked"
,但仍然没有。有任何想法吗?
<div class="onoffswitch-container">
<span class="onoffswitch-title">Open Inline</span>
<span class="onoffswitch">
<input type="checkbox" class="onoffswitch-checkbox" id="inline">
<label class="onoffswitch-label" for="inline">
<span class="onoffswitch-inner" data-swchoff-text="OFF" data-swchon-text="ON"></span>
<span class="onoffswitch-switch"></span>
</label>
</span>
</div>
原文由 Igorski88 发布,翻译遵循 CC BY-SA 4.0 许可协议
只需写“已检查”即可