<! PUBLIC DOCTYPE HTML "- / / / / W3C DTD XHTML 1.0 Transitional / / EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > <html xmlns="http://www.w3.org/1999/xhtml"> --> <head> <meta http-equiv="Content-Type" content="text/html; </title> </head> <body> <script>var I =1</script> <input type=button The onclick = "document. Body. InsertAdjacentHTML (' beforeEnd ', '< span > name < / span > < input type =" text name = "+ I +" value = >' + i++ + ' Brand < span > < / span > < input type = "text name =" + I + "value = '+ i++ +' > < span > size < / span > < input type =" text name = "+ I +" value = > '+ i++ +' ')" value= add > </body> </ HTML >Copy the code
The renderings are as follows: