<body>
<form>
<input id="t1" type="text" onchange="changeEve()"/>
</form>
<script>
function changeEve() {
var e = document.getElementById("t1");
console.log(e.value);
}
</script>
</body>
获取表单的值
document.getElementById("pw").value;