我写了个简单的页面,大家帮忙看看哪里出错了,总得不到预想的结果
页面上共12个按纽,按第一个按纽,使中间十个按纽的Value值分别减1按第一个按纽,使中间十个按纽的Value值分别加1
我写的代码运行出来的结果老是没反应,大家帮忙看看哪里出错了:
原代码如下:
<html>
<head>
<title></title>
<script language="JavaScript" type="text/javascript">
funtion change0()
{
var objs = document.all["a"];
for(i=0,i<n,i++)
objs[i].value=objs[i].value-10;
}
funtion change1()
{var objs = document.all["a"];
for(i=0,i<n,i++)
objs[i].value=objs[i].value+10;
}
</script>
</head>
<body>
<form>
<input name="buttonp" type="button" value="previous" onclick="change0()">
<input name="button1" id="a" type="button" value="1">
<input name="button1" id="a" type="button" value="2">
<input name="button1" id="a" type="button" value="3">
<input name="button1" id="a" type="button" value="4">
<input name="button1" id="a" type="button" value="5">
<input name="button1" id="a" type="button" value="6">
<input name="button1" id="a" type="button" value="7">
<input name="button1" id="a" type="button" value="8">
<input name="button1" id="a" type="button" value="9">
<input name="button1" id="a" type="button" value="10">
<input name="buttonn" type="button" value="next" onclick="change1()">
</form>
</body>
</html>