Problem mit Vergleich von zwei zahlen in javascript

mein html-code ist wie:

<html>
<SCRIPT type="text/javascript" language="JavaScript">   
function fun()
{
var l = document.test.low.value;
var h = document.test.high.value;
alert(l);
alert(h);
    if(l >h){
        alert("low greater than high low is -"+l+"high is -"+h);
    }
}
</SCRIPT>

<body>

<form name="test">
<input type="text" size="11" id="low" />
<input type="text" size="11" id="high" />
<input type="button" value="sss" onClick="fun()"/> 
</form>
</body>
</html>

wenn ich Vergleiche diese beiden Werte mit niedrig 12 hoch ist, ist die 112 nicht funktioniert.
wie 22 und 122, 33 und 133 etc....

Bin ich mit dem IE-browser version 8. bitte helfen Sie.

InformationsquelleAutor sudha | 2012-02-01
Schreibe einen Kommentar