fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"> </script> <script> $(document).ready(function(){ $("p span").has("a[href]").css("background-color","yellow"); }); </script> </head> <body> <h1>欢迎来到我的主页</h1> <p>我的<span>名字</span>叫 Donald。</p> <p>我住在<span><a href="http://www.fmpq.com">Duckburg</a></span>。来拜访我!</p> <p>我<span>最好的</span>朋友是 Mickey。</p> </body> </html>
运行结果