如何获得总和值的整数
现在它的显示像这样 http://www.koolfree.com/ImageUpload/uploads/1380114018.jpg
我想要那样 http://www.koolfree.com/ImageUpload/uploads/1380160965.jpg
请帮我解决这个问题谢谢
<script type="text/javascript"><!--
function updatesum() {
document.form.sum.value = (document.form.sum1.value -0) / (document.form.sum2.value -0);
}
//--></script>
<body>
<form name="form" >
Enter a number:
<input name="sum1" onChange="updatesum()" />
and another number:
<input name="sum2" onChange="updatesum()" />
Their sum is:
<input name="sum" readonly style="border:0px;">
</form>
</body>