<%@ page language="java" pageEncoding="GB2312"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<!-- 在JSP中添加javascript代码,防止用户空提交 -->
<script language="javascript">
function checkValidate()
{
//判断用户名是否为空
if(document.form1.textfield1.value==""||document.form1.textfield1.value==null)
{
window.alert("用户名不能为空!!!");
return false;
}
//判断手机号是否为空
if(document.form1.textfield2.value==""||document.form1.textfield2.value==null)
{
window.alert("手机号不能为空!!!");
return false;
}
//判断密码是否为空
if(document.form1.textfield3.value==""||document.form1.textfield3.value==null)
{
window.alert("密码不能为空!!!");
return false;
}
}
</script>
<base href=" <%=basePath%>">
<title>register.jsp页面 </title>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body bgcolor=cyan>
<form id="form1" name="form1" method="post" action="RegisterValidate.jsp">
<p> <img src="file:///D|/MyEclipseWorkPlace5.5/MyProject0/WebRoot/login pictures/register.jpg" width="203" height="137" /> </p>
<p> <strong> 用户名:
<input name="textfield1" type="text" />
</strong> </p>
<p> <strong>手机号: </strong>
<input type="text" name="textfield2" />
</p>
<p> <strong> 密 码: </strong>
<input type="password" name="textfield3" />
</p>
<p> <strong>确认密码: </strong>
<input type="password" name="textfield4" />
</p>
<p>
<input type="submit" name="Submit" value="免费注册" οnclick="return checkValidate();"/>
<input type="reset" name="Reset" value="重置" />
</p>
</form>
</body>
</html>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<!-- 在JSP中添加javascript代码,防止用户空提交 -->
<script language="javascript">
function checkValidate()
{
//判断用户名是否为空
if(document.form1.textfield1.value==""||document.form1.textfield1.value==null)
{
window.alert("用户名不能为空!!!");
return false;
}
//判断手机号是否为空
if(document.form1.textfield2.value==""||document.form1.textfield2.value==null)
{
window.alert("手机号不能为空!!!");
return false;
}
//判断密码是否为空
if(document.form1.textfield3.value==""||document.form1.textfield3.value==null)
{
window.alert("密码不能为空!!!");
return false;
}
}
</script>
<base href=" <%=basePath%>">
<title>register.jsp页面 </title>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body bgcolor=cyan>
<form id="form1" name="form1" method="post" action="RegisterValidate.jsp">
<p> <img src="file:///D|/MyEclipseWorkPlace5.5/MyProject0/WebRoot/login pictures/register.jpg" width="203" height="137" /> </p>
<p> <strong> 用户名:
<input name="textfield1" type="text" />
</strong> </p>
<p> <strong>手机号: </strong>
<input type="text" name="textfield2" />
</p>
<p> <strong> 密 码: </strong>
<input type="password" name="textfield3" />
</p>
<p> <strong>确认密码: </strong>
<input type="password" name="textfield4" />
</p>
<p>
<input type="submit" name="Submit" value="免费注册" οnclick="return checkValidate();"/>
<input type="reset" name="Reset" value="重置" />
</p>
</form>
</body>
</html>