情况:
<input id="${items.xxtx_id}${status.index+1}" type="radio" name="${items.xxtx_id}" value="checked" style="display: none;" onclick="updatestatus(this)"
<c:if test="${items.result=='checked'}">
checked="checked"
</c:if>/>
<label for="${items.xxtx_id}${status.index+1}" style="cursor:pointer;" class="tw-form-label">
<div class="abc"//此处原来是a标签
<c:if test="${items.result=='checked'}">
style="display:none"
</c:if>
>否</div></label>
<input type="radio" id="${items.xxtx_id}${status.index+1}${status.index+1}" name="${items.xxtx_id}" value="unchecked" style="display: none;" onclick="updatestatus(this)"
<c:if test="${items.result=='unchecked'}">
checked="checked"
</c:if>/>
<label for="${items.xxtx_id}${status.index+1}${status.index+1}"
style="cursor: pointer;" class="tw-form-label">
<div class="abc" //此处原来是a标签
<c:if test="${items.result=='unchecked'}">
style="display:none"
</c:if>>是
</div>
</label>
如代码所示,原来的代码中,注释的地方我用的a标签,此处特别的地方是我有两个radio且在同一行,a标签行级,display :none使用后,该显示的会变成多余的字符(大概是这个意思)就会显示“…”,换成div后块级元素就没有这种bug
没什么技术点,主要就是反思一下,一个小bug弄了一下午,纯粹的面向百度编程,但是这种小点,百度根本百度不到,就是再浪费时间,所以,形成良好的解决问题的习惯才是解决问题的根本,就如同上面的bug,先搞清省略号形成的原因,再想想和别的情况有什么区别,然后不断尝试,纯粹的询问和百度效率低的可怕,也让人烦躁,当然,通过百度寻找解决办法也是必要的(闭门造车就是大傻子了)。