HTML Code:
<script language="JavaScript">
function add(val1,val2) {
var result = val1 + val2;
document.write(result);
}
</script>
<input type="text" name="value1" value=""/>
<input type="text" name="value1" value=""/>
<div onClick="javascript:add(document.value1.value,document.value2.value);">Add</div>
I assume that's what you mean? Now I haven't actually tested this, so my initial thought would be that it doesn't work because of some syntax error but if so, it's not too far from being correct.
“The best thing about a boolean is even if you are wrong, you are only off by a bit.”