<div class="codetitle"> <span><a style="CURSOR: pointer" data="79764" class="copybut" id="copybut79764" onclick="doCopy('code79764')"><u>코드 복사</u></a></span> 코드는 다음과 같습니다.</div> <div class="codebody" id="code79764"> <br><%@ page contentType="text/html; charset=utf-8"%> <br><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br><html xmlns="http://www.w3.org/1999/xhtml"> <br><머리> <br><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <br><title>용户注册</title> <br><스크립트 언어="javascript"> <br><!-- <BR>function MyForm(){ <BR>msg.innerHTML="debug::in function"; <BR>var 사용자 이름 = document.form1.username.value; <BR>var msg = document.getElementById("msg"); <BR>if(username.length==0){ <BR>msg.innerHTML="[ 提示:용户name불能为空! ]"; <BR>document.form1.username.focus(); <BR>거짓을 반환합니다. <BR>} <BR>var pass = document.form1.password.value; <BR>if(pass.length==0){ <BR>msg.innerHTML="[ 提示:密码不能为空! ]"; <BR>document.form1.password.focus(); <BR>거짓을 반환합니다. <BR>} <BR>var pass1 = document.form1.password1.value; <BR>if(pass1.length==0){ <BR>msg.innerHTML="[ 提示:确认密码不能为空! ]"; <BR>document.form1.password1.focus(); <BR>거짓을 반환합니다. <BR>} <BR>if(pass1!=pass){ <BR>msg.innerHTML="[ 提示:您两次输入的密码不一致! ]"; <BR>document.form1.passwoid.focus(); <BR>거짓을 반환합니다. <BR>} <BR>var mail = document.form1.mail.value; <BR>if(mail.length==0){ <BR>msg.innerHTML="[ 提示:E_mail불能为空! ]"; <BR>document.form1.mail.focus(); <BR>거짓을 반환합니다. <BR>} <BR>var i = form1.mail.value.indexOf("@"); <BR>var j = form1.mail.value.indexOf("."); <BR>if((i<0)||(j<0)||(i-j>0)) <BR>{ <BR>msg.innerHTML="[ 提示:您输入的E_mail格式不正确,请正确输入!]"; <BR>document.form1.mail.focus(); <BR>거짓을 반환합니다. <BR>} <BR>msg.innerHTML=""; <BR>참을 반환합니다. <BR>} <BR>--> <br></script> <br></head> <br><body onload="document.form1.username.focus()"> <br><form id="form1" name="form1" method="post" action="" onsubmit="return MyForm()"> <br><table width="389" border="1" align="center" cellpadding="5"> <br><tr> <br><td colspan="2"><div align="center">사용户注册<br /></div></td> <br></tr> <br><tr> <br><td colspan="2" align="center" bordercolor="" <BR>bgcolor=""> <br><font color="red"><span id="msg">${error}</span> </글꼴> <br></td> <br></tr> <br><tr> <br><td width="71">용도명:</td> <br><td width="286"><라벨> <br><input name="username" type="text" id="username" size="20" /> <br></라벨> <br>*(必填)</td> <br></tr> <br><tr> <br><td>사용户密码:</td> <br><td><라벨> <br><input name="password" type="password" id="password" size="20" /> <br></라벨> <br>*(必填)</td> <br></tr> <br><tr> <br><td>중대复密码:</td> <br><td><라벨> <br><input name="password1" type="password" id="password1" size="20" /> <br></라벨> <br>*(必填)</td> <br></tr> <br><tr> <br><td>电子邮件:</td> <br><td><라벨> <br><input name="mail" type="text" id="mail" size="25" /> <br></라벨> <br>*(必填)</td> <br></tr> <br><tr> <br><td>电话:</td> <br><td><라벨> <br><input name="tel" type="text" id="tel" size="22" /> <br></label></td> <br></tr> <br><tr> <br><td>QQ:</td> <br><td><라벨> <br><input name="qq" type="text" id="qq" size="22" /> <br></label></td> <br></tr> <br><tr> <br><td colspan="2"><라벨> <br><div align="center"> <br><input type="submit" name="Submit" value="注册" /> <br><input type="reset" name="Submit2" value="중계" /> <br></div> <br></label></td> <br></tr> <br></테이블> <br></form> <br></body> <br></html> <br> </div>