日期:2014-05-16 浏览次数:20393 次
<!DOCTYPE html>
<html>
<head>
<title>
</title>
</head>
<body>
<div align="center">
<br>
<br>
<br>
<button onclick="add()">ADD</button>
<button onclick="delete()">DELETE</button>
</div>
<div name="target" id="target" align="center">
</div>
<script>
function add() {
var para=document.createElement("p");
var node=document.createTextNode("This is new.");
para.appendChild(node);
var element=document.getElementById("target");
element.appendChild(para);
}
</script>
</body>
</html>