<%@LANGUAGE="JAVASCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<script language="javascript">
function after()
{ var m=document.getElementById("km(0)").value
m1=m+0.03
m2=m+0.06
document.getElementById("km(1)").value= m1+"mm"
document.getElementById("km(2)").value= m2+"mm"
}
</script>
<body>
</body><form action="writefile.asp" method="post" name="form1" id="form1" >
<table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolordark="#FFFFFF" bordercolor="#000000">
<tr>
<td height="20" colspan="4" bgcolor="#4E5960">
<div align="center" class="STYLE2"><font color="#FFFFFF" class="STYLE2"><b>检 定 校 准 测 试 记 录 录 入</b></font></div></td>
</tr>
<tr>
<td width="25%" bgcolor="#efefef"><div align="left" class="STYLE2">
<input type="text" name="km(0)" id="km(0)" onblur="after()"></td>
</tr>
<tr>
<td width="25%" bgcolor="#efefef"><div align="left" class="STYLE2">
<input type="text" name="km(1)" id="km(1)" ></td>
</tr>
<tr>
<td width="25%" bgcolor="#efefef"><div align="left" class="STYLE2">
<input type="text" name="km(2)" id="km(2)" ></td>
</tr></table>
</form>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<script language="javascript">
function after()
{ var m=document.getElementById("km(0)").value
m1=m+0.03
m2=m+0.06
document.getElementById("km(1)").value= m1+"mm"
document.getElementById("km(2)").value= m2+"mm"
}
</script>
<body>
</body><form action="writefile.asp" method="post" name="form1" id="form1" >
<table width="100%" border="1" cellspacing="0" cellpadding="1" bordercolordark="#FFFFFF" bordercolor="#000000">
<tr>
<td height="20" colspan="4" bgcolor="#4E5960">
<div align="center" class="STYLE2"><font color="#FFFFFF" class="STYLE2"><b>检 定 校 准 测 试 记 录 录 入</b></font></div></td>
</tr>
<tr>
<td width="25%" bgcolor="#efefef"><div align="left" class="STYLE2">
<input type="text" name="km(0)" id="km(0)" onblur="after()"></td>
</tr>
<tr>
<td width="25%" bgcolor="#efefef"><div align="left" class="STYLE2">
<input type="text" name="km(1)" id="km(1)" ></td>
</tr>
<tr>
<td width="25%" bgcolor="#efefef"><div align="left" class="STYLE2">
<input type="text" name="km(2)" id="km(2)" ></td>
</tr></table>
</form>
</html>
-----------------------
你这行是什么东东啊?
form1.km ---------这种写法是不对滴
楼上的写法可以满足你的要求
var m=document.getElementById("km(0)").value