Write the code using JavaScript that validates if all the fields of the form are filled. (3) Submit the HTML code, JavaScript code and screenshot of the form opened in a browser window. You must demonstrate the form and validations at the time of viva
Here is a simple example of HTML and JavaScript code that validates if all the fields in a form are filled out before submission. If any of the fields are empty, an alert will appear prompting the user to fill out all the fields.
### HTML Code:
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Form Validation</title>
<script src="script.js"></script>
</head>
<body>
<h2>Registration Form</h2>
<form id="registrationForm" onsubmit="return validateForm()">
_________ ______ __________ ______ _________ _______ ________ __________ ___ _____ ______ ____.
_________ ______ ________ ______ __________.
__________ __________ _________ ____ ______ _______ ___ ____ ______ __________.
_____ _________ ___ ___ ___ _________ _____ ___ ___ _______ _________.
____ _____ _________ ______ ___ _________ ______ ______ ______ ______ _______.
_____ ____ _____ ________ _______ _________ ____ ______ ____.
______ _________ ___ __________ _______ _________ _______ ______ _______ __________.
________ ____ ___ __________ __________ _______ ____ _________ ____ __________.
______ _______ ____ _________ ___ ______.
______ _______ ______ _____ ________ ____ ______ _________ ________ _____ ______ ______.
_________ ______ ___ ________ _______ __________ ___ ___ ______.
_______ ________ _____ ___ _____ ____ ________ _____ _____.
_____ ____ __________ __________ ___ _______ _______ _______.
______ _______ _____ ______ _________ _________ ____ __________ ____ ______ ____ _______.
______ ______ _____ _________ __________ _________ ______ ____ ____.
______ ____ _______ __________ ___ ________ ___ _________ __________ ___ _________ _______.
_______ ___ __________ __________ _________ ________ ____ ______ __________.
______ _____ ____ ______ _____ ____ ____ _____ ____.
____ ____ ________ ___ __________ ____ ____ ___ ______ ______ _____ _____.
_________ ______ ________ ___ ______.
_______ ______ __________ _________ _________ ___ __________.
______ __________ ____ _________ ________ _____ _________ ____ _____ ________ ____ ________.
______ ________ __________ ______ __________ ________ ________ ___.
________ __________ _____ __________ ______ _____ _________ _____ ____ __________.
____ ______ ____ _____ ____ __________ _______ ________.
_____ __________ _________ _____ _______ ______ ___.
___ ________ __________ ___ ____ ____ _____ _____ ________.
_____ ___ ____ _________ _______ _________ ____ ____ ________ ________ ________ ____.
________ __________ ________ ________ ________ _____ ________ ____ __________ _________ _________ _______.
_____ ____ _____ _____ _______ _______ _______ ______ ____ _______ _______.
___ _________ __________ _____ _________ _____ ________ _________ ____ ___ ______.
_________ _______ ____ _______ ________ _________ _____ _____ __________ ______ ______ ____.
________ _________ ___ _________ _________ ________ ____ ________ _______.
__________ ______ _____ _____ ___.
_________ ______ _____ _________ _________ _____ _______ ___ ________ _____.
________ _____ _______ ______ _________ ________ ___ _______ __________.
___ ________ __________ _____ ________ ______ ________ ____.
________ ____ _______ _____ _____ __________ _________ ______.
__________ _________ ____ _________ ______ _______ ______.
__________ ____ _________ _____ _____ _____.
___ _________ __________ ______ ____ _____ ______ ____ ________.
______ ____ ___ ___ __________ ______ ____ _________ ___.
_____ _______ ___ ___ _______ __________.
_____ _______ ___ ____ _________.
_____ __________ ______ _______ _______ __________ _______ ______ _______ ___ ___ ___.
_______ _____ ____ ________ ____ ____ _____ _____ __________ _____ _____ __________.
________ ___ _________ _____ ________ ___ __________ __________ __________ ______ _________.
_____ ______ _________ ______ ___ _________ ________ _________ __________ ________ ____.
________ _______ ____ ______ ____ ______ ___ ___.
_______ _______ ______ __________ _____ _______.
___ _____ _________ ______ ______ _________ _________ ________ ____ ____ ______.
________ _________ ____ __________ ___ _____ __________ _______ _________ ___ ______ __________.
___ __________ _____ __________ __________ __________ ___.
Get Full Answer on WhatsApp