简体   繁体   English

禁用的属性不适用于Xhtml

[英]attribute disabled not function with Xhtml

I have a page Xhtml where I have a span inside a td. 我有一个Xhtml页面,我在td中有一个跨度。

When I put the attribute disabled = "disabled" I expect that the cell becomes gray and in fact, on ie9 is so. 当我把属性disable =“ disabled”放进去时,我期望单元格变成灰色,实际上,ie9上是这样。 Unfortunately on chrome, firefox and IE10 is not so. 不幸的是在chrome上,Firefox和IE10并非如此。

The cursor is disabled, but the cell does not turn gray. 光标被禁用,但是该单元格不会变成灰色。 Can you tell me why. 你能告诉我为什么吗。

Thanks. 谢谢。

My code: 我的代码:

<tr>
<td background="background.gif" disabled="disabled" id="btnIdentify">
    <span type="text">Identify</span>
</td>

It doesn't work in all the major browsers as disabled is not a valid attribute for the td tag! 不适用于所有主流浏览器,因为禁用不是td标签的有效属性! You have to find another solution to achieve what you want. 您必须找到另一个解决方案来实现您想要的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM