查找最后一个td而不使用Jquery [英] Find last td without using Jquery

查看:118
本文介绍了查找最后一个td而不使用Jquery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要找到HTML表中每行的Last td,并从该td中删除一个css。我可以不使用Jquery。
如何?

I need to find the Last td of every row in a HTML table, and remove a css from that td. Can I do it without using Jquery. How?

推荐答案

您可以使用css3 last-child 属性为此。这样写:

You can use css3 last-child property for this. Write like this:

tr td:last-child{
 color:red;
}

但它不能在IE8&

But it's not work in IE8 & below.

这篇关于查找最后一个td而不使用Jquery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆