jquery复习

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <script src="js/jquery-1.11.0.js" type="text/javascript" charset="utf-8"></script>
    </head>
    <body>
        <h1>这是h1</h1>
        <h1>这是h2</h1>
        <h1>这是h3</h1>
        <h1>这是h4</h1>
        <script type="text/javascript">
//            document.querySelector('h1').style.background='skyblue';
//            document.querySelector('h1').style.fontSize="50px";

            var list=document.querySelectorAll('h1')
            for(var i=0;i<list.length;i++){
                list[i].style.background='skyblue',
                list[i].style.fontSize='100px'
            }

//            $('h1').css({
//                background:'red',
//                fontSize:'100px',
//                color:'skyblue'
//            })
//            
        </script>
    </body>
</html>
原文地址:https://www.cnblogs.com/wwthuanyu/p/10555075.html