Javascript 当我给它一个不存在的类名时,表不能正确呈现
它在IE8上运行良好,但在IE9或最新的Chrome上不起作用 我怀疑这是因为我使用未定义的类名作为标记来选择某些元素。就像元素的ID一样。例如:Javascript 当我给它一个不存在的类名时,表不能正确呈现,javascript,jquery,html,css,cross-browser,Javascript,Jquery,Html,Css,Cross Browser,它在IE8上运行良好,但在IE9或最新的Chrome上不起作用 我怀疑这是因为我使用未定义的类名作为标记来选择某些元素。就像元素的ID一样。例如:dnaRow 类dnaRow实际上并不存在。当我删除class=“dnaRow”时,它会再次工作 <TR> <TD width="18%">Duration of the Contact</TD> <TD width="82%"> <input tabIndex="4
dnaRow
类dnaRow
实际上并不存在。当我删除class=“dnaRow”
时,它会再次工作
<TR>
<TD width="18%">Duration of the Contact</TD>
<TD width="82%">
<input tabIndex="4" type="text" id="contactduration" name="contactduration" class="dataentry blueFont_inset"
<c:choose>
<c:when test="${update}">
value='<c:out value="${apptLength}" />'
</c:when>
<c:when test="${contactInfoMap != null && contactInfoMap['p_actual_appointment_length'] != null}">
value="<c:out value="${ contactInfoMap['p_actual_appointment_length']}" />"
</c:when>
</c:choose>
/>
</TD>
</TR>
<tr class="dnaRow">
<td width="18%" class="dna" >
DNA$
</td>
<td width="82%" style="float: left; padding-right: 3px; white-space:nowrap" >
<div id="dnaDiv">
<input tabIndex="5" id="dnaCheckbox" type="checkbox" >
</div>
</td>
</tr>
联系期限
脱氧核糖核酸$
我看不出这有什么影响的原因。但是如果我是你,我会在ie9中加载页面并按f12,然后查看计算样式(有或没有类名集)。因此,您可以查看存在哪些样式更改,并跟踪更改的来源。作为测试,如果您将类的名称更改为完全奇怪的名称(class=“totalyweirdclassname”),问题是否仍然存在?