Danke an alle.
Habe es nun hinbekommen:
function input() {
var es;
(document.getElementsByName("cb1").checked = true)
{
es = 100;
}
we=document.getElementById("we").value =
parseFloat(document.getElementById("lv").value)+
parseFloat(document.getElementById("ie").value)+es;
}
--------------------------
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="layout.css" />
<script src="expcalculator.js" type="text/javascript"></script>
</head>
<body>
<form name="allcbs">
<div style="position:absolute; top:20px; left:290px;">
<input type="button" value="OK" onclick="input();" style="width: 100px; height:40px; font-weight:bold;">
<input type="reset" value="Reset all">
</div>
<div style="position:absolute; top: 180px;">
<table cellpadding="2">
<tr>
<td width="190" bgcolor="#616d7e">Property
<td width="50" bgcolor="#616d7e">Sum</td></tr>
</table>
<table border="1">
<tr>
<td width="190">
Textbox1:
<td>
<input type="text" id="lv" size="4" maxlength="2" value="0">
</td>
</tr>
<tr>
<td>
Textbox2:
<td>
<input type="text" id="ie" size="4" maxlength="3" value="0">
</td>
</tr>
<tr>
<td>Textbox3:
<td>
<input type="checkbox" name="cb1">
</td>
</tr>
</table>
<div style="position:absolute; top: 200px; left:1px;"><b>
Ausgabe: <input type="text" id="we" size="4" maxlength="3" value="0">
</div>
</form>
</div>
</body>
</html>
Noch eine Frage: Was ist der Unterschied zwischen Radio-Buttons und Checkboxen?
Danke noch mal. :)