1

我正在制作一个议程管理器,并且我有一个 javascript,每当输入输入时都会调用它,javascript 应该存储所有输入。仅输入一个输入时它正在工作。我想让它适用于所有输入:'

window.onload=init;
var i, celula, celulas;
function init(){

celulas = document.getElementsByTagName("input");

for(var i = 0; i<=celulas.length; i++)
{

celula = celulas[i];
celula.onchange = alterouCelula;
}

}
function alterouCelula()
{
var inputsValor = {};
inputsValor[this.name] = this.value;
alert(value);
}

这是我的html

<form action="AgendaPHP.php" method="POST" id="formulario">
<table class="tabela">
<tr>
<td>00:00</td>
<td><input border="0" name="Segunda00" type="text" id="00Segunda" onfocus = "" /></td>
<td><input border="0" name="Terça00" type="text" id="00Terça" onfocus = " " /></td>
<td><input border="0" name="Quarta00" type="text" id="00Quarta" onfocus = " " /></td>
<td><input border="0" name="Quinta00" type="text" id="00Quinta" onfocus = " " /></td>
<td><input border="0" name="Sexta00" type="text" id="00Sexta" onfocus = " " /></td>
<td><input border="0" name="Sabado00" type="text" id="00Sabado" onfocus = " " /></td>
<td><input border="0" name="Domingo00" type="text" id="00Domingo" onfocus = " " /></td>

</tr>
4

0 回答 0