编辑下面的代码:【加编码】
<html> <head> <script src="https://libs.baidu.com/jquery/1.10.2/jquery.min.js"> </script> <script> $(document).ready(function(){ $(".intro,.demo,.end").css("background-color","yellow"); }); </script> </head> <body> <h1>Welcome to My Homepage</h1> <p class="intro">This paragraph has class "intro".</p> <p>This is a paragraph.</p> <p class="demo">This paragraph has class "demo".</p> <p>This is another paragraph.</p> <p class="end">This paragraph has class "end".</p> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂