Question

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

02 Aug 2023
Answer :
Word Count : 588

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

IGNOU NEWS
Assignment Submission Last Date Extended Till 30 June 2026 Click Here★★★IGNOU June 2026 TEE Date Sheet Released Click Here★★★
Top
📞
Call Support Instant phone assistance Write the code using JavaScript that validates if all the fields of th
🟢
WhatsApp Chat Fast live messaging
Email Us Business enquiries & support