38-10000 web入门 jQuery 选择器使用

 

 

  

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>jquery程序基础案例</title>
      <!-- 1  首先是引入jQuery库文件  -->
      <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
    
    <div>这是元素选择器用法</div>
    <div>程序案例1</div>


    <script>

        $(function(){
              $("div").css("color", "red");

        })
    </script>
</body>
</html>

效果

   

 

posted @ 2021-11-20 17:48  优敏行  阅读(33)  评论(0)    收藏  举报