我试过用javascript做一个程序而html认为我是一个使用动态变量的文本文件,问题是,我不能做dinamic变量来做更快的过程。
function obtenerDatos() {
for (i = 1; i <= 14; i++) {
return {
var v = [];
for (i; i < 14; i++) {
v[i]: document.getElementById(i).value
};
//eval("v"+i): document.getElementById(i);
/*v1: document.getElementById('1').value,
v2: document.getElementById('2').value,
v3: document.getElementById('3').value,
v4: document.getElementById('4').value,
v5: document.getElementById('5').value,
v6: document.getElementById('6').value,
v7: document.getElementById('7').value,
v8: document.getElementById('8').value,
v9: document.getElementById('9').value,
v10: document.getElementById('10').value,
v11: document.getElementById('11').value,
v12: document.getElementById('12').value,
v13: document.getElementById('13').value,
v14: document.getElementById('14').value,
fecha: (new Date()).toLocaleDateString()*/
};
}
};