书签 分享 收藏 举报 版权申诉 / 76

类型完整word版Web课程设计.docx

  • 文档编号:15774231
  • 上传时间:2023-07-07
  • 格式:DOCX
  • 页数:76
  • 大小:2.41MB

〈/body〉

〈scriptlanguage=”javascript"〉

functiontsubmit(){

varmyForm=document。

getElementById("form1");

varuserName=document。

getElementById(”user")。

value;

varpassword=document.getElementById("password").value;

varregPassWord=/^[a—zA-Z0—9]+$/;

if(userName。

length〉8){

alert(”请填写正确的用户名!

(最长8位)”);

document.getElementById("userName”)。

value="";

document.getElementById(”userName").focus();

elseif(!

regPassWord.test(password)||password。

lenth>16||password。

length〈4){

alert("请填写正确的用户名密码!

(4—16位的数字或字母)");

document.getElementById(”password")。

value=””;

document.getElementById(”password")。

focus();

}else{

//myForm.action=”login.jsp";

myForm.submit();

//注册

〈divclass="login—contentreg—content">

〈/div〉

〈formid="signupForm”name="signupForm”method="post”action=”Servlet2”>

〈divclass=”login—error”〉〈/div>

〈divclass=”row">

〈/div〉

〈/div〉

〈/div〉

〈divclass=”row"〉

〈inputtype=”text"name="tel"placeholder="联系电话"class="input—text—usernoPicinput—click”id="tel”required〉

〈/div>

〈divclass=”rowtips"〉

我已阅读并同意

〈/div〉

〈divclass=”rowbtnArea”〉

〈/form〉

已有帐号,请

jsp”class=”link”>登录〈/a〉

〈/div>

〈/div〉

〈/div>

〈/body〉

functioncheckForm(){

varb=true;

varmyForm=document。

getElementById(”signupForm”);

varuserName=document.getElementById("user”)。

value;

varpassword=document。

getElementById("password”).value;

varAgainPassword=document.getElementById("passwordAgain”)。

value;

varName=document.getElementById("name”)。

value;

varregPassWord=/^[a-zA-Z0-9]+$/;

if(userName。

length>8||!

userName){

alert("用户名为空或用户名格式错误(最长8位)”);

document.getElementById(”userName”)。

value=”";

document。

getElementById(”userName”)。

focus();

b=false;

}

elseif(!

regPassWord.test(password)||password.lenth〉16||password。

length<4){

alert("密码为空或请用户密码格式错误(4—16位的数字或字母)”);

document。

getElementById("password")。

value="";

document.getElementById(”password")。

focus();

b=false;

elseif(password!

=AgainPassword){

alert("您两次输入的密码不一样,请重新输入!

”);

document。

getElementById("passwordAgain”).value="”;

document。

getElementById(”passwordAgain”).focus();

b=false;

elseif(!

Name){

alert(”姓名不能為空!

”);

b=false;

if(b){

alert("注册成功!

");

myForm。

submit();

}

//Servlet

@WebServlet("/Servlet2")

publicclassServlet2extendsHttpServlet{

privatestaticfinallongserialVersionUID=1L;

/**

*@seeHttpServlet#HttpServlet()

*/

publicServlet2(){

super();

//TODOAuto-generatedconstructorstub

}

/**

*@seeHttpServlet#doGet(HttpServletRequestrequest,HttpServletResponseresponse)

*/

protectedvoiddoGet(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{

//TODOAuto—generatedmethodstub

request。

setCharacterEncoding("UTF-8");

response。

setContentType(”text/html;charset=utf-8");

InsertInformationdata=newInsertInformation();

SelectInformationnum=newSelectInformation();

Stringuser=request.getParameter("user”);

Stringpassword=request.getParameter("password”);

StringpasswordAgain=request.getParameter("passwordAgain");

Stringname=request。

getParameter(”name”);

Stringtel=request。

getParameter(”tel”);

if(data.InsertData(num。

Length(),user,password,passwordAgain,name,tel)==true){

request.getRequestDispatcher("/login。

jsp").forward(request,response);

}

else

request.getRequestDispatcher("RegisterFail。

jsp").forward(request,response);

/**

*@seeHttpServlet#doPost(HttpServletRequestrequest,HttpServletResponseresponse)

*/

protectedvoiddoPost(HttpServletRequestrequest,HttpServletResponseresponse)throwsServletException,IOException{

//TODOAuto-generatedmethodstub

doGet(request,response);

}

4。

1.2职工岗位工资信息查询

〈bodyonload="session()">

〈big〉职工岗位工资信息查询

〈inputtype="button”name="button”id=”button"value="返回主菜单”onclick="ons8()”style=”background—color:

transparent”/〉

〈inputtype=”button”name="button"id="button”value=”查看留言板"onclick=”ons9()"style=”background—color:

transparent”/>

〈divalign="center”〉

〈tdwidth=”70px"height=”50px”>岗位编号

〈td〉岗位名称

〈td〉月工资

医疗保险〈/td〉

失业保险〈/td>

〈%Stringstr[][]=newString[100][100];

str=(String[][])request。

getAttribute(”str");

for(inti=1;i〈=10;i++){

out。

print("");

if(str[i][1]==null)

break;

for(intj=1;j<=8;j++){%>

<%}

out。

print(””);

%〉

〈/

配套讲稿:

如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

特殊限制:

部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

关 键  词:
完整 word Web 课程设计
提示  冰点文库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
关于本文
本文标题:完整word版Web课程设计.docx
链接地址:https://www.bingdoc.com/p-15774231.html

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2