vendredi 22 juillet 2016

How to check duplicate value in inputs using jQuery

I have a html table and there is input in it. I want to check duplicate value in a custom column or In the other hand Non Dupllicated td value.

<table>
    <tr><td><input value="one"/></td></tr>
    <tr><td><input value="two"/></td></tr>
    <tr><td><input value="one"/></td></tr>
    <tr><td><input value="nine"/></td></tr>
    <tr><td><input value="four"/></td></tr>
</table>

I want check all input in td and if a value duplicated display error. For example in top code one is duplicated. I don't want to use for().

Aucun commentaire:

Enregistrer un commentaire