如何获取多个文本框的值啊,求方法
<!--function showF(){
var yhm=document.form1.t1.valu ;
var mm=document.form1.t2.value;
var dzyj=document.form1.t3.value;
var oElement=document.form1.
if(oElement.value==""){
alert("此表单字段不能为空!");
oElement.focus();
return false;
}
userInfo="用户名:"+document.form1.elements["textfield"].value+"; ";
userInfo+="密码:"+document.form1.textfield2.value+"; ";
userInfo+="电子邮件"+document.form1.h.vale;
document.all.p1.innerHTML=userInfo;
return;
}
-->
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="">
<table width="200" border="1">
<tr>
<td>
用户名:
<label>
<input type="text" name="t1" id="t1" width="50px"/>
</label>
</td>
</tr>
<tr>
<td>
密码:
<label>
<input type="password" name="t2" id="t2" width="50px"/>
</label>
</td>
</tr>
<tr>
<td>
电子邮件:
<label>
<input type="email" name="t3" id="t3" width="50px"/>
</label>
</td>
</tr>
<tr>
<td>
<input name="but" type="button" id="but" value="确定" onclick="showF();"/>
</td>
</tr>
</table>
</form>
<p align="center" id="p1"></p>
</body>
</html>