1 decade ago by dizzyniho
Hey guys I'm lerning js but i think there is something wrog with my code. It compares two should compare two numbers.
<!DOCTYPE HTML>
<html>
<head>
<title> Formulare </title>
</head>
<body>
<script type="text/javascript">
function Ausgabe() {
a = document.getElementById('Nr1').value;
b = document.getElementById('Br2').value;
if (a < b) {document.write}
}
</script>
<form>
Wert 1: <input type="text" name="Feld1" id="Nr1"><br>
Wert 2: <input type="text" name="Feld2" id="Nr2"><br><br>
<input type="button" value="Berechnung" onclick="Ausgabe()">
</form>
</body>
</html>
