国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

jQuery property node

In the previous section, we have already talked about how to create nodes and what are text nodes

In this section we will learn how to create attribute nodes

How to create attribute nodes and how we create text nodes It’s the same. Let’s look at a piece of code.

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <script src="http://libs.baidu.com/jquery/1.9.1/jquery.js"></script>
    <script>
        $(function(){
            var $div = $("<div name='dv'></div>");
            $("body").append($div);
        })
    </script>
</head>
<body>
    
</body>
</html>

Look at the above code. First, we create an attribute node, and then add the node to the body. In the browser, we press F12 to debug, and you can see the following In the source code, <div name='dv'></div>
has been added to the body

Continuing Learning
||
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title></title> <script src="http://libs.baidu.com/jquery/1.9.1/jquery.js"></script> <script> $(function(){ var $div = $("<div name='dv'></div>"); $("body").append($div); }) </script> </head> <body> </body> </html>
submitReset Code