Hola, necesito obtener el INDEX del campo
t y nada de esto me ha funcionado:
Código PHP:
<form action="" id="a">
<input name="t[5]" type="checkbox" onclick="alert(this.index.value);">
<input name="t[]" type="checkbox" onclick="alert(this.index);">
<input name="t[]" type="checkbox" onclick="alert(this.name.index);">
<input name="t[]" type="checkbox" onclick="alert(this.name.value);">
<input name="t[5]" type="checkbox" onclick="alert(document.forms.a.this.index.value);">
<input name="t[]" type="checkbox" onclick="alert(document.forms.a.this.name.index);">
<input name="t[]" type="checkbox" onclick="alert(document.forms.a.this.name.value);">
</form>
Cómo podria capturarlo ?