用HTML编写email注册的表单

如题所述

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>注册电子邮件</title>
<script language="javascript" type="text/javascript">
function check()
{
if ( document.getElementById("email").value == "" )
{
window.alert("请输入电子邮件地址");
document.getElementById("email").focus();
return false ;
}
else if ( document.getElementById("pwd").value == "" )
{
window.alert("请输入密码");
document.getElementById("pwd").focus();
return false ;
}
else if ( document.getElementById("pwd").value != document.getElementById("confirm").value )
{
window.alert("两次输入的密码不一致!请重新输入!");
return false ;
}
else
{
document.write("正在提交您的信息,请稍候!");
return true ;
}
}
</script>
</head>

<body>
<form action="提交完毕后的网页.php" method="post" onsubmit="return check()">
<table>
<tr>
<td>您要申请的电子邮件地址:</td><td><input type="text" id="email" />@abc.com</td>
</tr>
<tr>
<td>密码:</td><td><input type="password" id="pwd" /></td>
</tr>
<tr>
<td>密码确认:</td><td><input type="password" id="confirm" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="提交" /></td>
</tr>
</table>
</form>
</body>
</html>
温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-09-06
楼上的没明白,楼主想要一个 email 表单的正则.楼主自己收吧.