⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bodyregister.jsp

📁 一个用struts tiles的在线影院web系统
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%@ page language="java" contentType="text/html; charset=GB18030"    pageEncoding="GB18030" import="com.eline.vod.utils.*" %>
<script language="javascript" src="<%= request.getContextPath() %>/scripts/webform.js"></script>
<script type="text/javascript">
<!--
function bodyRegister_form1_onsubmit() {
	if (document.all["username"].value.length < 3 || document.all["password"].value.length < 6) {
		window.alert("用户名不能少于3个字符/密码不能少于6个字符!");
		return false;
	}
	if (document.all["j_re_password"].value != document.all["password"].value) {
		window.alert("密码和确认密码不相同!");
		return false;
	}
	if (document.all["mobilePIN"].value.length < 11) {
		window.alert("请正确输入手机号码!");
		return false;
	}
	if (document.all["verifyCode"].value.length == 0) {
		window.alert("请输入验证码!");
		return false;
	}
	if (!document.all["agree"].checked) {
		window.alert("您还没有同意本站网络服务许可协议!");
		return false;
	}
	return true;
}
function mainPage_onclick() {
	window.location.href = "<%=SiteUrls2.getInstance().getHomeURL()%>";
	return true;
}
/* 获取手机验证号 */
var returnCode = false;
var responseBody = "";
function getValidationCode() {
	var mobile = document.all["mobilePIN"].value;
	if (mobile.length < 11) {
		window.alert("请正确填写您的手机号码,如果无效则无法收到验证码哦!");
		return false;
	}
	// Callback functions
	function eventCallback(response, context) {
		window.alert("请稍侯...\n您将收到一条包含验证码的短信,将验证码输入后方可完成注册!");
		returnCode = true;
		responseBody = response;
	}
	function errorCallback(response, context) {
		window.alert(response);
		window.alert("出现错误...\n请确认手机号码正确再做尝试,如果仍有问题请联系管理员!");
		returnCode = false;
	}
	// Http request
	var randNum = Math.floor(Math.random() * (9999 + 1));
	webform_doRequest("pda_getpwd.jsp?random=" + randNum + "&mobile=" + mobile, eventCallback, "verifyCode", errorCallback, true);
	return true;
}
function validateUser() {
	var mobile = document.all["mobilePIN"].value;
	var username = document.all["username"].value;
	if (mobile.length < 11) {
		window.alert("请正确填写您的手机号码!");
		return false;
	}
	if (username.length == 0) {
		window.alert("请正确填写您的用户名");
		return false;
	}
	// Callback functions
	function eventCallback(response, context) {
		window.alert(response);
		returnCode = true;
		responseBody = response;
	}
	function errorCallback(response, context) {
		window.alert(response);
		window.alert("服务器通信故障...\n请稍后再试,如果仍有问题请联系管理员!");
		returnCode = false;
	}
	// Http request
	var randNum = Math.floor(Math.random() * (9999 + 1));
	webform_doRequest("user_validate.jsp?random=" + randNum + "&user=" + username + "&mobile=" + mobile, eventCallback, "verifyUser", errorCallback, true);
	return true;
}
//-->
</script>
<table cellSpacing="0" cellPadding="0" width="100%" border="0">
	<tr>
		<td height="10" align="center"><img src="<%= request.getContextPath() %>/images/04/reg_01_1.gif" /></td>
	</tr>
</table>
<table cellSpacing="0" cellPadding="0" width="650" align="center" border="0">
	<tr>
		<td colspan="3" height="25"><img src="<%= request.getContextPath() %>/images/04/t1.gif"></td>
	</tr>
	<tr>
		<td width="132" vAlign="top" bgColor="#fef977"><img src="<%= request.getContextPath() %>/images/04/t2.gif"></td>
		<td width="505"><p align="center" style="FONT-SIZE: 9pt; COLOR: #a05000; FONT-FAMILY: SimSun"><br/><b>用户注册</b></p>
		<form style="MARGIN: 0px 0px 0px 0px" name="bodyRegister_form1" action="<%= SiteUrls2.getInstance().getProperty(SiteUrls2.URL_USER_DO)%>?action=1" method="post" onsubmit="return bodyRegister_form1_onsubmit()">
		<table cellSpacing="1" cellPadding="3" width="100%" border="0">
			<tr>
				<td colspan="2"><font color="green">温馨提示:为防止资源恶意浪费,同时让您得到更优质的服务,本站采用手机号绑定注册的方式</font></td>
			</tr>
			<tr>
				<td align="right" width="25%">手机号码:</td>
				<td><input type="text" name="mobilePIN" maxLength="20" size="20"></td>
			</tr>
			<tr>
				<td align="right" width="25%">验证码:</td>
				<td><input type="text" name="verifyCode" maxLength="50" size="20"><INPUT type="button" value="获取验证码" onclick="return getValidationCode()"><br/><font color="red">点击'获取验证码',稍候将收到一个包含有效的验证码的短信!</font></td>
			</tr>
			<tr>
				<td align="right" width="25%">用户名:</td>
				<td><input type="text" name="username" maxLength="50" size="30">(英文字母,数字以及下划线)<br/><INPUT type="button" value="用户信息检测" onclick="return validateUser()"></td>
			</tr>
			<tr>
				<td align="right" width="25%">密码:</td>
				<td><input type="password" name="password" maxLength="50" size="30">(最短6个字符)</td>
			</tr>
			<tr>
				<td align="right" width="25%">确认密码:</td>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -