放入前:
<html>
<head>
<title>无标题 3</title>
</head>
<body>
 <p  id="paragraph1"></p>
 <input  type="button" value="Click here!" />
</body>
</html>
最后的效果:动态在body下创建一个div,然后放入所有的元素,以这个div作为容器<html>
<head>
<title>无标题 3</title>
</head>
<body>
<div>
<p id="paragraph1"></p>
<input type="button" value="Click here!" /> 
</div></body></html>