Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
也许这很简单,但我无法让它工作......这是我的代码:
function br_text() {$("#text_fields:contains('\(') ").each( function() { $(this).css('color','red') alert($(this).text()) } ) }
我需要获取包含带括号的字符串的对象(我试过没有转义字符,似乎是一样的。)谢谢你的帮助。
尝试类似:
function br_text() { $("body *:contains('(')").css("color", "red"); }