<input type="text" runat="server" id="resdiv" />
<script type="text/javascript">
function addthis(tid, val1)
{
if (tid.checked)
{
document.getElementById("resdiv").innerHTML = parseInt(document.getElementById("resdiv").value) + parseInt(val1);
}
else
{
document.getElementById("resdiv").innerHTML = parseInt(document.getElementById("resdiv").value) - parseInt(val1);
}
}
</script>
Try This , it will work .