?? 这样
<input type="text" name="t1"><input type="text" name="t2"><br>
<input type="text" name="t3">
<button onclick="kiss()">+++++++++</button>
<script language="JavaScript">
<!--
function kiss()
{
document.all.t3.value = parseInt(document.all.t1.value)+parseInt(document.all.t2.value)
}
//-->
</script>
<input type="text" name="t1"><input type="text" name="t2"><br>
<input type="text" name="t3">
<button onclick="kiss()">+++++++++</button>
<script language="JavaScript">
<!--
function kiss()
{
document.all.t3.value = parseInt(document.all.t1.value)+parseInt(document.all.t2.value)
}
//-->
</script>
<input type=text id=txt2 onkeypress="add()">
<input type=text id=txtRlt>
<script>
function add()
{
if(event.keyCode==13)
txtRlt.value=parseInt(txt1.value)+parseInt(txt2.value)
}
</script>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD><BODY>
<script language=javascript>
function change()
{
var maximg
var Quantity
var Price
Quantity=document.style.Quantity.value
Price=document.style.Price.value
document.style.total.value=Quantity+Price
}
</script><form name="style" method="post" action="insert.cfm">
<input type="text" name="Quantity" onKeyUp="change()" value="3">
<input type="text" name="Price" value="2">
<input type="text" name="total" value="6">
</form></BODY>
</HTML>
<input type=text name=b onkeyup="if ((a.value!='')&&(b.value!='')) c.value=parseInt(a.value)+parseInt(b.value)">
<input type=text name=c>