I have my code below..I need to modify it so that the input is checked if it is number.If its not a number, then a message has to be displayed as follows \" please enter only no
You may try like this:
if (!isNaN(parseFloat(obj)) && isFinite(obj);) { compare(); } else { alert("Please enter only numbers"); return false; }