miren....
Código HTML:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <script type="text/javascript"> var form1=document.form1; var name = 'keyword[]'; function check() { var keywords = document.getElementsByName(name); for (var i=0; i<keywords.length; i++) { for (j=i+1; j<keywords.length; j++) { if (keywords[i].value==keywords[j].value) { alert("Hay uno repetido mi buen amigo..."+" "+keywords[i].value+" "+keywords[j].value); return true; } } } } form1.submit(); </script> </head> <body> <form id="form1" name="form1" method="post" action="" > <input type="text" name="keyword[]" id="keyword[]" class="inputc" /> <input type="text" name="keyword[]" id="keyword[]" class="inputc" /> <input type="text" name="keyword[]" id="keyword[]" class="inputc" /> <input type="text" name="keyword[]" id="keyword[]" class="inputc" /> <input type="text" name="keyword[]" id="keyword[]" class="inputc" /> <input type="button" name="Submit" value="Enviar" onclick="check(form1);" /> </form> </body> </html>
gracias