Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function validateEmail()
- {
- var validemail = document.forms["feedback"]["email"].value;
- if (/(.+)@(.+).(.+)/.test(validemail)){
- return true;
- }
- else {
- alert('Invalid email or email not filled out')
- return false;
- }
- } // validateEmail
- </script>
- <script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js" integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" crossorigin="anonymous"></script>
- <script>
- function agecheck() {
- if($('input[name=age]:checked').length<=0)
- {
- alert("Please select your age");
- return false;
- }
- } // agecheck
- </script>
- <form name = feedback onsubmit=" validateEmail() && validatename() && agecheck() ">
Add Comment
Please, Sign In to add comment