in reply to Re^7: Onkeyup not working
in thread Onkeyup not working
still its not workin out. this is the script
it only prints $name not jone
#!/usr/bin/perl -wT use strict; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); my $name = "jone"; print "Content-type: text/html\n\n"; print <<'HTML'; <!DOCTYPE html> <html> <head> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquer +y.min.js"></script> </head> <body> <input type="text" class="keyup-email text-input" name="7" value=""> <button type="butt +on" id="m1p" class="edBtn"> submit </b> </button> $name <script> $('.keyup-email').keyup(function() { var inputVal = $(this).val(); var emailReg = /^(?!.*_)\w+([\.-]?\w+)*@\w+([\.-]? +\w+)*(\.\w{2,3})/; if(!emailReg.test(inputVal)) { $(".edBtn").prop("disabled", true); } else if(inputVal == 'test@test.com') { $(".edBtn").prop("disabled", true); }else{ $(".edBtn").prop("disabled", false); } }); </script> </body> </html> HTML
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Onkeyup not working
by marto (Cardinal) on Oct 08, 2023 at 14:34 UTC | |
by frank1 (Monk) on Oct 08, 2023 at 15:15 UTC | |
by frank1 (Monk) on Oct 08, 2023 at 15:25 UTC | |
by marto (Cardinal) on Oct 08, 2023 at 16:28 UTC | |
by Anonymous Monk on Oct 08, 2023 at 20:32 UTC |