?? addadmin.jsp
字號:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c" %><%@ taglib uri="/WEB-INF/fmt.tld" prefix="fmt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>中國電信上海網上客服中心--用戶注冊</title><link href="../../css/shct10000.css" rel="stylesheet" type="text/css"><style type="text/css"><!--.STYLE1 { font-size: 14px; font-weight: bold;}--></style><!-- <script type="text/javascript"> --var req; function loginNameCheck(){ var loginName = document.getElementById('loginName').value; var url = "../checkNameExist.do?type=admin&loginName="+loginName; if (window.XMLHttpRequest) { req = new XMLHttpRequest(); }else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); } if(req){ req.open("post", url, true); req.onreadystatechange = callback; req.send(null); } } function callback() { if (req.readyState == 4) { if (req.status == 200) { parseMessage(); }else{ alert ("Not able to retrieve description" + req.statusText); } }else{ document.getElementById("info").innerHTML = "正在驗證用戶名...."; } } function parseMessage() { var xmlDoc = req.responseXML.documentElement; var node = xmlDoc.getElementsByTagName('info'); document.getElementById('info').innerHTML = node[0].firstChild.nodeValue; } function clearCheckInfo() { document.getElementById('info').innerHTML = ""; } </script>--> <script type="text/javascript"><!-- //用戶登錄function loginNameCheck(url){ // alert("into check..."); var username = document.getElementById("loginName").value; // var password = document.getElementById("loginPassword").value; // var parameter = "username="+username+"&password="+password; var parameter = "username="+username; alert("parameter="+parameter); var loginDiv = document.getElementById("loginDiv"); loginDiv.innerHTML = "<font size='4' color='green'>"+"正在檢測...</font>"; sendAsynchronRequest(url,parameter,loginCallBack);} var xmlHttp;//create XMLRequest objectfunction createXMLHttpRequest(){ if(window.XMLHttpRequest){ //Mozilla 瀏覽器 xmlHttp = new XMLHttpRequest(); }else if(window.ActiveXObject) { //IE 瀏覽器 try{ xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); }catch(e){ try { xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); }catch(e){} } } if(xmlHttp == null){ alert("不能創建XMLHttpRequest對象實例"); return false; }}//發送異步請求的方法 AsynchronRequest methodfunction sendAsynchronRequest(url,parameter,loginCallBack){ createXMLHttpRequest(); if(parameter == null){ //步驟三:設置屬性(事件處理器) xmlHttp.onreadystatechange = loginCallBack; //步驟四: 設置 open()和 send()方法并調用 //alert("before open()..."); xmlHttp.open("GET",url,true); //發出一個異步的請求 //alert("after open()..."); //alert("before send()..."); xmlHttp.send(null);//該方式請求體為空 //alert("after send()..."); }else{ xmlHttp.onreadystatechange = loginCallBack; xmlHttp.open("POST",url,true); //post提交必須設置為此種方式 xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;"); //將 patameter放置在請求體當中 xmlHttp.send(parameter); }}//處理用戶登錄返回結果的回調函數function loginCallBack(){ // alert("readyState="+xmlHttp.readyState); //步驟六:判斷是否全部接收返回信息和信息是否正確 if(xmlHttp.readyState == 4){ // alert("status="+xmlHttp.status); if(xmlHttp.status == 200){ var xmlDoc = xmlHttp.responseXML; var message = xmlDoc.getElementsByTagName("message")[0]; var error = xmlDoc.getElementsByTagName("error")[0]; var loginDiv = document.getElementById("loginDiv"); if(message != null){ alert("該帳戶可以使用"); loginDiv.innerHTML = "<font size='4' color='green'>"+message.firstChild.nodeValue+"</font>"; } if(error != null ){ loginDiv.innerHTML = "<font size='4' color='red'>"+error.firstChild.nodeValue+"</font>"; } } }} --></script></head> <c:if test="${!empty message}" > <script type="text/javascript"> alert('<c:out value="${message}"/>'); </script> <c:remove var="message"/> </c:if><body><center><form name="addAdminForm" method="post" action="/woss_ajd0706_team3/admin/addAdmin.do"> <table width="776" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td align="left" style="border-bottom:1px solid #E5E5E5"><img src="../../image/index_zc_sign-up2.gif" width="120" height="30"></td> </tr> <tr> <td height="25" align="left"> 請填寫您的注冊信息 </td> </tr> </table> <!--書簽插入位置--> <table width="776" border="0" cellspacing="0" cellpadding="0"> <tr> <td id="card1" width="776" align="center" bgcolor="#3D84CD" style="cursor:hand; color:#ffffff; font-size:14px; font-weight:bold"> 基本信息</td> </tr> </table> <table width="776" border="0" cellspacing="0" cellpadding="0" style="border:1px solid #E5E5E5"> <tr> <td align="center"> <table width="764" border="0" cellspacing="0" cellpadding="0"> <tr> <td colspan="4" align="left"> <font style="color:#FAAD45">*</font> 為必填信息: </td> </tr> </table> <table width="764" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="20" height="25" align="center" style="color:#FAAD45">*</td> <td width="100" height="25" align="center"> 網站帳號:</td> <td width="177" height="25" align="left"> <span class="table_k_bg1"> <input type="text" id="loginName" name="loginName" maxlength="20" size="20" value="" alt="網站帳號" > </span> </td> <td align="left" width="467" > <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="117" align="left"> <img src="../../image/shct10000_in_buttonSFKY.gif" height="23" width="114" border="0" style="cursor:hand;padding-top:2px" onClick="javascript:loginNameCheck('../../admin/managers/checkLogin.do');"> </td> <td id="info" colspan="4" style="color:red; font-size:14px; font-weight:bold" align="left" > <DIV id="loginDiv"></DIV></td> </tr></table> </td> </tr> <tr> <td colspan="2"> </td> <td colspan="2" align="left"> (賬號的有效字符為a-z小寫英文字母、0-9數字或下劃線“_”,長度應在1-10個字符之間) </td> </tr> </table> <table width="764" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="20" height="30" align="center" valign="middle" style="color:#FAAD45">*</td> <td width="100" height="30" align="center" valign="middle"> 登錄密碼:</td> <td width="177" height="30" align="left" valign="middle"> <span class="table_k_bg1"> <input type="password" name="password1" size="21" value="" alt="登錄密碼" onfocus="clearCheckInfo();"> </span> </td> <td width="467" height="30" align="left" valign="middle"> <a href="#"></a> (最少為6位數字或者字母) </td> </tr> <tr> <td width="20" height="30" align="center" valign="middle" style="color:#FAAD45">*</td>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -