首页 > 代码库 > PHP—提交
PHP—提交
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>无标题文档</title>
</head>
<body>
<script language="javascript">
function ckfrm(){
if(document.uform.uname.value.length<3){
alert("用户名至少是三个字符");
document.uform.uname.focus();
return false;
}
if(document.uform.upwd2.value!=document.uform.upwd.value){
alert("你两次输入的密码不一致,请重新输入");
document.uform.upwd.value="";
document.uform.upwd2.value="";
document.uform.upwd.focus();
return false;
}
}
</script>
<form name="uform" id="uform" method="post" action="reg_save.php" onSubmit="return ckfrm()">
<table width="98%" border="0" cellspacing="0" cellpadding="15">
<tr>
<td width="28%" align="right">用户名:</td>
<td width="54%"><label for="uname"></label>
<input type="text" name="uname" required id="uname"></td>
<td width="18%"> </td>
</tr>
<tr>
<td align="right">密码:</td>
<td><label for="upwd"></label>
<input type="password" name="upwd" required id="upwd"></td>
<td> </td>
</tr>
<tr>
<td align="right">确认密码:</td>
<td><label for="upwd2"></label>
<input type="password" name="upwd2" id="upwd2"></td>
<td> </td>
</tr>
<tr>
<td align="right">称呼:</td>
<td>
<label>
<input type="radio" name="usex" value="http://www.mamicode.com/男" id="usex_0">
先生</label>
<label>
<input type="radio" name="usex" value="http://www.mamicode.com/女" id="usex_1">
女士</label>
<label>
<input name="usex" type="radio" id="usex_2" value="http://www.mamicode.com/妖" checked="CHECKED">
其它</label>
</td>
<td> </td>
</tr>
<tr>
<td align="right">联系电话:</td>
<td><label for="utel"></label>
<input type="text" name="utel" id="utel"></td>
<td> </td>
</tr>
<tr>
<td align="right">联系QQ:</td>
<td><label for="uqq"></label>
<input type="text" name="uqq" id="uqq"></td>
<td> </td>
</tr>
<tr>
<td align="right"> </td>
<td><input type="submit" name="button" id="button" value="http://www.mamicode.com/提交">
<input type="reset" name="button2" id="button2" value="http://www.mamicode.com/重置"></td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>
PHP—提交