Okay, this isn't such a daunting task to take on in your first attempt...
something like this (assuming you want the varible that is written in the body to be updated each time the checkbox is clicked)
this is very basic
- HTML: Select all
<html>
<head>
<!-- head stuff ect //-->
<script type="text/javascript">
var myvar = 100; // declare the varible to be used later in the piece
// this function will be called when the checkboxes are clicked, it will change the value of
// myvar and update the area on the page
function changeMyvar (varAmount)
{
myvar = varAmount;
document.getElementById('myvarHolder').innerHTML = myvar;
}
</script>
</head>
<body>
<!-- this span holds the value of my var and will be uupdated later //-->
<span id="myvarHolder">
<script type="text/javascript">
document.write(myvar);
</script>
</span>
<form>
<input type="checkbox" value="300" onclick="changeMyvar(300)" />
<input type="checkbox" value="390" onclick="changeMyvar(390)" />
<input type="checkbox" value="450" onclick="changeMyvar(450)" />
</form>
</body>
</html>
The above ^^, very simply, does what you ask I believe