码迷,mamicode.com
首页 > Web开发 > 详细

PHP—提交

时间:2016-11-28 23:44:46      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:oct   rip   name   required   提交   输入   ons   amp   title   

 

<!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%">&nbsp;</td>
</tr>
<tr>
<td align="right">密码:</td>
<td><label for="upwd"></label>
<input type="password" name="upwd" required id="upwd"></td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="right">确认密码:</td>
<td><label for="upwd2"></label>
<input type="password" name="upwd2" id="upwd2"></td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="right">称呼:</td>
<td>
<label>
<input type="radio" name="usex" value="男" id="usex_0">
先生</label>
<label>
<input type="radio" name="usex" value="女" id="usex_1">
女士</label>
<label>
<input name="usex" type="radio" id="usex_2" value="妖" checked="CHECKED">
其它</label>
</td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="right">联系电话:</td>
<td><label for="utel"></label>
<input type="text" name="utel" id="utel"></td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="right">联系QQ:</td>
<td><label for="uqq"></label>
<input type="text" name="uqq" id="uqq"></td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="right">&nbsp;</td>
<td><input type="submit" name="button" id="button" value="提交">
&nbsp;
<input type="reset" name="button2" id="button2" value="重置"></td>
<td>&nbsp;</td>
</tr>
</table>
</form>
</body>
</html>

PHP—提交

标签:oct   rip   name   required   提交   输入   ons   amp   title   

原文地址:http://www.cnblogs.com/wang1593840378/p/6111609.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!