Home > front end >  Want to ask why can't this script execution
Want to ask why can't this script execution

Time:09-24

<% @ page import="javax.mail. Security. The auth. Refreshable" % & gt;
<% @ 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;
Insert the title here
The function check () {
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;



Account no. & lt;/td>
Password: & lt;/td>
Confirm password: & lt;/td>
Real name: & lt;/td>
Home address: & lt;/td>
Contact phone: & lt;/td>




Gender: & lt;/td>
Age: & lt;/td>



Hobbies: & lt;/td>


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;
Alert (" user name already exists!" );
</script>
<%} % & gt;

CodePudding user response:

Var em=document. Fr. Em. The value;
This line to delete, no em elements in your form

CodePudding user response:

reference 1/f, the sky wave response:
var em=document. Fr. Em. Value;
This line to delete, you didn't form the em element



Thank you very much!!!!!! I find for a long time thanks again!!!!!!!!!!!!!!!!!!!!

Great god I want to ask why did not remove the em element cannot run the script

CodePudding user response:

Var em=document. Fr. Em. The value;
This line to delete, you didn't form the em element
Should be reminded again

CodePudding user response:

reference zhtoad reply: 3/f
var em=document. Fr. Em. Value;
This line to delete, you didn't form the em element
Should be reminded again
but there is no software I haven't found an error

CodePudding user response:

reference 4 floor UnlessD response:
Quote: reference zhtoad reply: 3/f

Var em=document. Fr. Em. The value;
This line to delete, you didn't form the em element
Should be reminded again
but no I haven't found the software error

nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related