I had correct the error and made somethings like this, but the click vent handler not work for me, i haven choose the radio button and click submit, it show the output to me
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml">
<head><title> Practical Lab 5.5</title>
<script type = "text/javascript" src = "sum.js"></script></head>
<body>
<form name = "myForm" action = "" >
Motherboard (RM59 each) <input type="radio" id="value1" name="value1" onclick ="addNumbers(val1)" value="59" />
<br />
Harddisk (RM49 each) <input type="radio" id="value2" name="value2" onclick ="addNumbers(val2)" value="49" />
<br />
Keyboard (RM39 each) <input type="radio" id="value3" name="value3" onclick ="addNumbers(val3)" value="39" />
<br />
<input type="button" name="Sumbit" value="Submit" onclick="javascript:addNumbers()"/>
<br />
Total cost including 5% tax = <input type="text" id="answer" name="answer" value=""/>
</form>
</body>
function addNumbers()
{
var val1 = parseInt(document.getElementById("value1").value);
var val2 = parseInt(document.getElementById("value2").value);
var val3 = parseInt(document.getElementById("value3").value);
var ansD = document.getElementById("answer");
ansD.value = val1 + val2 + val3 + 7.35;
}