Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
0 votes
304 views
in Q2A Core by
edited by

 

function validate()
{
 if(condition)
  {
   alert(" abc")
  }
 else
  {
 
   }
..
..
..
..
<input type="submit" value="button" id="button" onClick="return(validate())" >
 
 
.......
 
 
 
in above coding, when we click on the SUBMIT button, it will validate the function, and check the condition if it will be true => then return alert box...
but when it will be false I want to go to  the INDEX.HTML file.. so What should I write in ELSE section?? so thatif condion will false it will go to the INDEX.HTML file..

Please log in or register to answer this question.

...