从js中取html表单中的内容格式为document.form[0].user1.value或document.yourformname.user1.value 你这样写当然是不行的。form.name1.value是相对于html中的id而言的。无须在js中定义