在这段代码中,我的复选框出现了一个奇怪的问题:
<div class="two-column-layout">
<input type="checkbox" name="externalSystemEndPoint" class="hidden" />
<input type="checkbox" checked="checked" id="endPoint-{{endPointCode}}" name="externalSystemEndPoint" title="{{externalSystemName}}" value="{{endPointCode}}" {{disabledAttribute mandatory}}/>
<label for="endPoint-{{endPointCode}}" class="checkbox-label">{{externalSystemName}}</label>
</div>即使出现了第二个复选框(使用id="endPoint-{{endPointCode}}"),属性checked="checked"的效果也没有得到应用。
有什么暗示吗?
提前谢谢。
更新:--这是生成的代码:
<fieldset class="form-fieldset ui-corner-all">
<legend class="form-fieldset-legend ui-state-default ui-corner-all">
External Systems
</legend>
<div class="two-column-layout">
<input type="checkbox" name="externalSystemEndPoint" class="hidden">
<input type="checkbox" checked="checked" id="endPoint-CHIX_ENDPOINT" name="externalSystemEndPoint" title="Childrens Index" value="CHIX_ENDPOINT">
<label for="endPoint-CHIX_ENDPOINT" class="checkbox-label">Childrens Index</label>
</div>
<div class="two-column-layout">
<input type="checkbox" name="externalSystemEndPoint" class="hidden">
<input type="checkbox" checked="checked" id="endPoint-CIIX_ENDPOINT" name="externalSystemEndPoint" title="Citizens Index" value="CIIX_ENDPOINT">
<label for="endPoint-CIIX_ENDPOINT" class="checkbox-label">Citizens Index</label>
</div>
</fieldset>发布于 2015-05-25 07:41:35
在下面的片段中,它似乎工作得很好。也许你的模板有问题。如果您仍然面临这个问题,请告诉我场景的细节。
.hidden{
display: none;
}<fieldset class="form-fieldset ui-corner-all">
<legend class="form-fieldset-legend ui-state-default ui-corner-all">
External Systems
</legend>
<div class="two-column-layout">
<input type="checkbox" name="externalSystemEndPoint" class="hidden">
<input type="checkbox" checked="checked" id="endPoint-CHIX_ENDPOINT" name="externalSystemEndPoint" title="Childrens Index" value="CHIX_ENDPOINT">
<label for="endPoint-CHIX_ENDPOINT" class="checkbox-label">Childrens Index</label>
</div>
<div class="two-column-layout">
<input type="checkbox" name="externalSystemEndPoint" class="hidden">
<input type="checkbox" checked="checked" id="endPoint-CIIX_ENDPOINT" name="externalSystemEndPoint" title="Citizens Index" value="CIIX_ENDPOINT">
<label for="endPoint-CIIX_ENDPOINT" class="checkbox-label">Citizens Index</label>
</div>
</fieldset>
https://stackoverflow.com/questions/30421840
复制相似问题