<td>的title里摆放了一些字串。如果字串里含有特定的字串,想要高亮。
$('.pinmap td').filter(function(){var t = $(this).attr("title"); return t.substring(t.lastIndexOf("Functional Block ")).indexOf("Test")>=0;}).css("background-color","#FF0");
各种调试,死活不工作。
做一个简单的测试,可以看到返回的时true。
var sss=$('.pinmap tr:nth-child(3) td:nth-child(3)').attr('title');
$('#test').html(/Test/i.test(sss.substring(sss.lastIndexOf("Functional Block "))));
请问问题出在哪里呢?
--
FROM 114.165.107.*