showing results for - "eye icon view in credit card number input field"
Hanna
21 Apr 2019
1<script type="text/javascript">
2    $(function () {
3        $(".card-number input[type='password']").keyup(function (event) {
4            var len = $(this).val().toString().length;
5            if (len == 4) {
6                $(this).next().focus();
7            }
8        });
9
10        $(".card-number input[type='button']").click(function () {
11            var number = 0;
12            $(".card-number input").not("input[type='button']").each(function (index, element) {
13                number += $(element).val();
14            });
15            alert(number);
16        });
17    });
18
19
20
21</script>
22
23<!-- ####-####-####-#### -->
24<div class="card-number" >
25    <input type="password" value="" maxlength="4" />
26    <input type="password" value="" maxlength="4" />
27    <input type="password" value="" maxlength="4" />
28    <input type="text" value="" maxlength="4" />
29    <input type="button" value="go" />
30</div>