<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
*{
margin: 0;
padding: 0;
}
body {
padding: 20px;
}
#list {
list-style: none;
width: 400px;
border: 1px solid #666666;
}
li {
list-style: none;
background: #a7cbff;
margin: 10px 0;
}
textarea {
display: block;
width: 400px;
height: 50px;
margin: 10px 0;
}
</style>
<script type="text/javascript">
window.onload = function () {
// 获取元素
var list = document.getElementById('list');
var text = document.getElementById('text');
var btn = document.getElementById('btn');
// 按钮添加点击事件,把输入框的内容显示到留言列表
</script>
</head>
<body>
<ul id="list">
<li>评论1</li>
<li>评论2</li>
</ul>
<textarea id="text"></textarea>
<button id="btn">确定</button>
</body>
</html>