Implementation Functions: 1. A student asked me to implement such a function, like PHP. Enter a number in the form and then the corresponding number appears on the webpage; if it is PHP, it will be much simpler. Jquery is still the first implementation, so we will start a crazy experiment and finally implement it (knowledge point: Jquery creates nodes, obtains form values, and loops) jquery code: <script type = "text/javascript" language = "javascript" >$ (function () {$ ("# btn "). click (function () {// select the element whose ID is btn and add the click Event var result = $ ("input [name = 'text']"). val (); // obtain the value of the text box whose name is 'text' and define it as the result $ ("div") variable "). remove (". abc "); // The role is to include each execution. delete the div of the abc class; for (I = 1; I <= result; I ++) {// for Loop, set I = 1, and Add 1 for each loop; when the I value is the same from 1 to the value equal to result (that is, "name = 'text' value of the text box ") stop the loop var createobj =$ ("<div class = 'abc'> created node </div> "); // define div as the variable createobj $ ("body "). append (createobj); // append the createobj variable to the 'body' in html}); </script> HTML code: <body> <input type = "text" id = "text" name = "text"/> <input type = "button" id = "btn" value = "OK "/> </body> CSS code: <style>. abc {height: 50px; width: 50px; margin: 20px; background: # ccc ;}</style>