在线急等,高分求教
部分程序:
i=0;
while(i<SP.length)
{
//sp[0]=0,sp[1]=1
stakeobj=form1.stake+SP[i].value;//请问我这样引用,对吗??
document.write(stakeobj);
alert(stakeobj);
TotalStake+=6
i++;
}
<form name="form1" method="post" action="">
<input name="stake0" type="text" id="stake0" onBlur="CalculateReturn(this,this.value,6,0);" value="0">
<input name="stake1" type="text" id="stake1" onBlur="CalculateReturn(this,this.value,6,1);" value="0">
<input name="TotalStake" type="text" id="TotalStake" readonly="">
</form>
我想获得下面文本框输入的内容,我在脚本中stakeobj=form1.stake+SP[i].value,不能获得内容,而采用
stakeobj=form1.stake0.value却能.
请教!!!