I have two input fields and i am wondering how do i compare value's between these two fields.
<input id="start" type="numeric" value="" /> <input id="end" type="numeric" value="" /> In above input fields, if the value in input field with id='start' is greater than id='end', i want to display an alert.
I tried below but not working
if ($("#end").val() > $("#start").val()) { //do something }else { alert('Wrong Input'); } What am i doing wrong???
type="number", As per my knowledge there is type as suchnumeric)in the if statement