Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script>
- window.onload = function () {
- function validate() {
- var fname = document.forms["signUp"]["fname"].value;
- var sname = document.forms["signUp"]["sname"].value;
- if(fname == "" || sname == "") {
- return false;
- }
- }
- }
- </script>
- </head>
- <body>
- <form name="signUp" action="http://naivist.net/form" method="GET" onsubmit="return validate()">
- <div>
- <label>Name</label>
- <input type="text" name="fname">
- <label>Surname</label>
- <input type="text" name="sname">
- </div>
- <input type="submit">
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement