var pwd1 = Document.form1.pwd1.value;
var pwd2 = Document.form1.pwd2.value;
这里有错误,你要么
var pwd1 = form1.pwd1.value;
var pwd2 = form1.pwd2.value;
要么
var pwd1 = document.getElementById("pwd").value;
var pwd2 = document.getElementById("pwd2").value;
另外
alter 也写错了,应该是 alert("两次输入密码不一致,请重新输入!");