fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> <script src="http://cdn.static.fmpq.com/libs/jquery/3.0.0/jquery.min.js"></script> </head> <body> <div> <p class='.box'>一些文本</p> <span class='.box'>一些文本</span> <p class='box'>一些文本</p> </div> <script> $(function () { $( "div" ).find( "." + $.escapeSelector( ".box" ) ).css('color','red'); }) </script> </body> </html>
运行结果