http://api.jquery.com/attr/As of jQuery 1.6, the .attr() method returns undefined for attributes that have not been set.
so your code will go wrong. change your code as follows:
$('.pName1 td').filter(function(){
var t;
return (t = $(this).attr("title") ) && t.substring(t.lastIndexOf("Key String = ")).indexOf("Test") >= 0;
})
.css("background-color", "#FF0");
【 在 ottffsse (nothing) 的大作中提到: 】
: 你这html明显不对啊。后面多了这么一堆:
: </div>
: </td></tr>
: ...................
--
修改:ottffsse FROM 183.95.135.*
FROM 183.95.135.*