<script language="javascript">
function hello(form){
form.w3.value=parseInt(form.w1.value)+parseInt(form.w2.value)
event.returnValue=false
}
</script>
<form name="myform" onsubmit="hello(this)">
<input name="w1" type="text" id="w1" size="10" value="10">
<input name="w2" type="text" id="w2" size="10" >
<input name="w3" type="text" id="w3" size="10" >
<input type="submit">
</form>
你是讲这样吗?