日期:2014-05-16 浏览次数:20435 次
if(document.formcar.hdd[i].checked)
{
var z=document.formcar.aid01.value;
var id=document.formcar.hdd[i].id;
z=document.getElementById(id.replace("hdd","aid01")).value;
var array = document.getElementsByTagName("input")
for (var i = 0; i< array.length; i++) {
if (array[i].type != "hidden") continue;
if (array[i].name != "aid01") continue;
array[i].value = z;
}
resualt=true;
}
if(document.formcar.hdd[i].checked)
{
var z=document.formcar.aid01.value;
var t=0;//获取t值
var id=document.formcar.hdd[i].id;
z=document.getElementById(id.replace("hdd","aid01")).value;
var array = document.getElementsByTagName("input")
for (var i = 0; i< array.length; i++) {
if (array[i].type != "hidden") continue;
if (array[i].name == "aid01")
array[i].value = z;
else if(array[i].name == "aid02")
array[i].value = t;
else
{
//其他处理
}
}
resualt=true;
}
if(document.formcar.hdd[i].checked)
{
var z=document.formcar.aid01.value;
var t=document.formcar.aid02.value;;//像z一样初始化你的t
var id=document.formcar.hdd[i].id;
z=document.getElementById(id.replace("hdd","aid01")).value;
z=document.getElementById(id.replace("hdd","aid02")).value;//和z一样获取
var array = document.getElementsByTagName("input")
for (var i = 0; i< array.length; i++) {
if (array[i].type != "hidden") continue;
if (array[i].name == "aid01")
array[i].value = z;
else if(array[i].name == "aid02")
array[i].value = t;
else
{
//其他处理
}
}
resualt=true;
}