<html> <head> <script language="javascript"> function compare(){ if(document.form1.a.value < document.form1.b.value){ alert("a must more than b"); }else{ alert("ok"); }
<html> <head> <script language="javascript"> function compare(){ if(parseInt(document.form1.a.value) < parseInt(document.form1.b.value)){ alert("a must more than b"); }else{ alert("ok"); }