javascript - display message on wrong password entry -


I have a submit button that is written as "win" only. Now I am trying to display "wrong keyword entry" on an incorrect message if the word entered in the form field is not "victory" here is the code

   & Lt; Input type = "submit" class = "bigbutton" value = "next" & gt; & Lt; / Form & gt; & Lt; Script & gt; Function check () {if (document.getElementById ("win"). Value == "win") return true; Second false return;  

}

If I were you I would add an HTML element In order to fill an error, you can then style it with CSS, but you want it.

  & lt; Div id = "error" & gt; & Lt; / Div & gt;  

Then your function will look something like this:

  function check () (if (document.getElementById ("victory"). Value == "win ") True return; Else document.getElementById (" Error "). InnerHTML =" incorrect keyword entry. "Description is false;}  

Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -