<script>
??? function fs()
??? {
??????? var no=document.getElementsByName("invoiceNo");
?
??for(var i=0;i<no.length;i++)
??{
???fss(i,no[i].value);
? ????? }
??? }
???
??? function fss(indexs,val)
??? {
??????? var no=document.getElementsByName("invoiceNo");
??????? for(var v=0;v<no.length;v++)
??????? {
??????????? if(indexs!=v)
??????????? {
??????????????? if(val==no[v].value)
??????????????? {
??????????????????? alert('有相等的值');
??????????????????? return;
??????????????? }
??????????? }
??????? }
??? }
</script>
?
<body>
??? <input name="invoiceNo"/><br>
???? <input name="invoiceNo"/><br>
???? <input name="invoiceNo"/><br>
??????<input name="invoiceNo"/><br>
???????<input name="invoiceNo" /><br>
???????<input type="button" onclick="fs()" value="ck"/>
</body>