I am not sure how to ask this, but this is what I am wondering.
I am new to JS and am looking at a lot of webpages' sources. The thing that keeps coming up that I can't figure out is when you click a button (whatever it may be: next, submit, etc) how does it compare the input value to whatever it has. The button is given the input type = 'submit' but it doesn't explain where its destination is or what its comparing inputed data with.
Hope I explained well enough.
p.s. Thanks for any replies, and I have tried to look this question up; however, appears to be to vague.