写法
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
#sy{
300px;
}
</style>
</head>
<body>
<select id="sy" size="7">
</select>
<input type="text" id="tx1"/>
<input type="button" id="s1" value="提交" />
</body>
</html>
<script>
var tx1 = document.getElementById("tx1")
var s1 = document.getElementById("s1")
var sy = document.getElementById("sy")
s1.onclick = function(){
sy.innerHTML += "<option>"+ tx1.value+"</option>"
tx1.value = ""
}
</script>