How to prevent repeated values?

Asked

Viewed 56 times

1

Hello, I am new still in development and I need to validate input fields, more precisely prevent the inputs of the same column within a table have repeated values.

Html example

<!DOCTYPE html>

<html lang="pt-br">
<head>
    <meta charset="utf-8" />
    <title>Navegador em tabela HTML</title>
    <link rel="stylesheet" type="text/css" href="estilo.css" />
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
    <script type="text/javascript" src="script.js"></script>
</head>
<body>
    <table class="dados">
        <thead>
            <tr>
                <th>Código</th>

            </tr>
        </thead>
        <tbody>
            <tr>
                <td><input type="text" id="idcodFab" name="cfabri"class="codFab" /></td>
            </tr>
            <tr>
                <td><input type="text" id="idcodFab" name="cfabri"class="codFab" /></td>
            </tr>
            <tr>
                <td><input type="text" id="idcodFab" name="cfabri"class="codFab" /></td>
            </tr>
        </tbody>
    </table>
<input type="submit" class="Cenviar" value="Enviar" id="00007667" />
</body>
</html>

From now on, I appreciate all your help.

  • You can try the code I leave you here. jsfiddle 1º Need to give different id in input’s 2º use Jquery

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.