jquery基本选择器

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
<ul>
    <li id="one"></li>
    <li></li>
    <li class="green"></li>
    <li></li>
    <li></li>
</ul>
<script src="jquery-1.12.4.js"></script>
<script>
    $(function () {
       //$("#one, .green").css("backgroundColor", "pink");
//        $("li.green").css("backgroundColor", "pink");
    });
</script>
</body>
</html>

 

posted @ 2018-10-17 15:03  {颜逸}  阅读(120)  评论(0编辑  收藏  举报