【发布时间】:2009-04-14 20:17:50
【问题描述】:
我想使用 jquery 来选择以下范围:
<span id="RequiredFieldValidator1" class="validationerror" style="color: Red; display: none;">*</span>
但不要选择下面的 span,它与原来的不同之处在于 style 属性有一个 display 属性,其值为 inline 而不是 none。
<span id="RequiredFieldValidator2" class="validationerror" style="color: Red; display: inline;">*</span>
我知道内联样式是邪恶的,但一个 asp.net 网络表单验证器控件正在生成它,并做了很多好事和坏事。
这可以使用 jquery 选择器来完成吗?我是 jquery 的新手。
【问题讨论】: