<% @ page language="Java" contentType="text/HTML. Charset=utf-8 "
PageEncoding="utf-8" % & gt;
<style type="text/CSS" & gt;
Table {margin - left: 35%}
</style>
<meta charset="utf-8" & gt;
Var uname=document. Fr. Uname. Value;
Var PWD=document. Fr. PWD. Value;
Var pwd2=document. Fr. Pwd2. Value;
Var em=document. Fr. Em. The value;
Var name=document. Fr. Name. The value;
Var adress=document. Fr. Adress. Value;
Var years=document. Fr. Years. The value;
If (uname=="" | | uname==null) {
Alert (" account can't be empty!" )
return false; }
The else
If (PWD=="" | | PWD==null) {
Alert (" password cannot be empty!" );
return false; }
The else
If (pwd2=="" | | pwd2==null) {
Alert (" please confirm password!" );
return false; }
The else
If (years=="" | | years==null) {
Alert (" age can't for empty!" );
return false; }
The else
If (PWD!={pwd2)
Alert (" input do not match the password twice!" );
return false; }
The else
If (adress=="" | | adress==null) {
Alert (" address can't be empty!" );
return false;
}
The else
If (name=="" | | name==null) {
Alert (" the name cannot be empty!" );
return false;
}
The else {
Alert (" registered success!" );
}
}
</script>
<body>
<% request. The setCharacterEncoding (" utf-8 "); % & gt;
Name="hobby" value="https://bbs.csdn.net/topics/sing" & gt; Sing & lt; Input type="checkbox" name="hobby" value="https://bbs.csdn.net/topics/dan" & gt; Dance & lt; Input type="checkbox" Name="hobby" value="https://bbs.csdn.net/topics/movie" & gt; The movies & lt; br> |
<% String error=request. The getParameter (" error ");
If (error!=null) {
% & gt;
</script>
<%} % & gt;