Agrego, también con:
Código Javascript
:
Ver originalvar cuotas = document.getElementsByName('cuota[]');
Y luego recorrer el array()
Código HTML:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <script type="text/javascript"> //<![CDATA[
function xxx(){
var cuotas = document.getElementsByName('cuota[]');
for(var i=0;i<cuotas.length;i++){
if(cuotas[i].value == ""){
alert('complete todas las cuotas');
}
}
}
//]]>
<form name="formulario" action="#"> <input name='cuota[]' type='text' value='000' size='5' /> <input name='cuota[]' type='text' value='' size='5' /> <input type="button" onclick="xxx();" value="verificar" />
Saludos