如何通过js实现勾选复选框
<divdata-sm-checkbox=""class="checkbox-button-container"><inputid="700864023_80396202...
<div data-sm-checkbox="" class="checkbox-button-container">
<input id="700864023_8039620202" name="700864023[]" type="checkbox" class="checkbox-button-input" value="8039620202">
<label class="answer-label checkbox-button-label clearfix" for="700864023_8039620202">
<span class="checkbox-button-display"></span>
<span class="checkbox-button-label-text question-body-font-theme user-generated">
Julia Cortes
</span>
</label>
</div>
上面是复选框的代码,在chrome的工程工具使用了document.getElementById('700864023_8039620202').checked = true;并返回ture但是页面上依然没有被勾选。怎么怎么办 展开
<input id="700864023_8039620202" name="700864023[]" type="checkbox" class="checkbox-button-input" value="8039620202">
<label class="answer-label checkbox-button-label clearfix" for="700864023_8039620202">
<span class="checkbox-button-display"></span>
<span class="checkbox-button-label-text question-body-font-theme user-generated">
Julia Cortes
</span>
</label>
</div>
上面是复选框的代码,在chrome的工程工具使用了document.getElementById('700864023_8039620202').checked = true;并返回ture但是页面上依然没有被勾选。怎么怎么办 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询