CodePudding user response:
You add a double quotes is string, not variable, and the last is true is not trueCodePudding user response:
Is this your javascript, not JSP ah,,,You compare the "pw1", "pw2," not pw1, pw2 the value of a variable
CodePudding user response:
Finally an if condition, what you write is:if (" pw1 "!="pw2"), variable names with quotes, becomes a two variable name string comparison, the results must be true, so once didn't meet the above conditions, at the end of the judgment will pop up two password is not consistent,
You change to the
if (pw1!=pw2)