<分区>
Possible Duplicate:
Find text string in jQuery and make it bold
如何使用 jQuery :contains(some text) 选择器,但只从“this is some text”中选择“some text”?
我有这样的东西:
<div class="search">this is some text</div>
我目前正在使用这样的代码:
$("div.search:contains(some text)").css("text-decoration","underline");
但这强调了“这是一些文本”,我希望它只强调“一些文本”。
我怎样才能最简单地完成它?