Código HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="javascript">
<!--
function Suma(isChecked, myValue)
{
tot = parseInt(document.form1.total.value);
myValue = parseInt(myValue);
if (isChecked) document.form1.total.value = tot + myValue;
else document.form1.total.value = tot - myValue;
}
-->
</script>
</head>
<body>
<form name="form1" method="post" action="">
<p>
<input name="checkbox" type="checkbox" onClick="Suma(this.checked,this.value)" value="100">
</p>
<p>
<input type="checkbox" name="checkbox2" onClick="Suma(this.checked,this.value)" value="50">
</p>
<p>
<input type="text" name="total" value="0">
</p>
</form>
</body>
</html>