Akila

Akila

  • NA
  • 216
  • 34.5k

how to compare three input fields in javascript

Nov 11 2021 9:20 AM

Hi

I want to compare three fields.three fields cannot be same if(document.getElementById("CurrentPassword").value==this.state.NewPassword||document.getElementById("NewPassword").value==document.getElementById("ConfirmPassword").value){ document.getElementById("error").innerHTML="! All Secret code cannot be same"; return false; }

I can create the condtion but some error will appear


Answers (3)