<html>
<body>
<ul id="ul"><li>我要留言</li></ul>
<input type="text" id="txt"/><input type="button" value="add" οnclick="add()"/>
</body>
</html>
<script>
function add(){
var ul = document.getElementById("ul");
var li = ul.firstChild.cloneNode(true);
var txt = document.getElementById("txt");
li.innerHTML = txt.value;
ul.appendChild(li);
txt.value = "";
}
</script>
如图: