You are on page 1of 32

KCS-052: WEB DESIGNING

12/5/2021 Shalu Gupta, MGMCOET. 1


Unit -4
Unit 4: Introduction to Client Side Scripting , Introduction to Java
Script , Javascript Types , Variables in JS, Operators in JS ,
Conditions Statements , Java Script Loops, JS Popup Boxes , JS
Events , JS Arrays, Working with Arrays, JS Objects ,JS Functions ,
Using Java Script in Real time , Validation of Forms, Related
Examples

12/5/2021 Shalu Gupta, MGMCOET. 2


• HTML Forms
• Introduction
• The <input> Element
• HTML Form Controls
• Form Attribute

• Java script with validation • Why do we need validation


• JavaScript form validation example

12/5/2021 Shalu Gupta, MGMCOET. 3


HTML Forms Introduction :

• HTML Forms are required when some data needs to be collected.


• For example during registration information like name, email-id,
address etc.
• A Form will take input form the site visitor and then post into a
backend application.
• It will perform require processing on the pass data based on
defined business logic inside application.

12/5/2021 Shalu Gupta, MGMCOET. 4


<form> element

• The HTML <form> element defines a form that is used to collect


user input:
• <form>
.
form elements
.
</form>
• An HTML form contains form elements.
• Form elements are different types of input elements, like text
fields, checkboxes, radio buttons, submit buttons, and more.

12/5/2021 Shalu Gupta, MGMCOET. 5


12/5/2021 Shalu Gupta, MGMCOET. 6
12/5/2021 Shalu Gupta, MGMCOET. 7
12/5/2021 Shalu Gupta, MGMCOET. 8
12/5/2021 Shalu Gupta, MGMCOET. 9
12/5/2021 Shalu Gupta, MGMCOET. 10
12/5/2021 Shalu Gupta, MGMCOET. 11
12/5/2021 Shalu Gupta, MGMCOET. 12
12/5/2021 Shalu Gupta, MGMCOET. 13
12/5/2021 Shalu Gupta, MGMCOET. 14
12/5/2021 Shalu Gupta, MGMCOET. 15
12/5/2021 Shalu Gupta, MGMCOET. 16
12/5/2021 Shalu Gupta, MGMCOET. 17
12/5/2021 Shalu Gupta, MGMCOET. 18
12/5/2021 Shalu Gupta, MGMCOET. 19
Validation of Forms
• Form validation is the process of checking that a form has been
filled in correctly before it is processed, this is called form
validation. What you need to know before from validation?
• HTML
• CSS
• JavaScript

Note:- If you don't have knowledge of HTML, CSS & JavaScript


than you may face some difficulties in validating a HTML form yet
I will make the entire step very easy to understand by you.

12/5/2021 Shalu Gupta, MGMCOET. 20


12/5/2021 Shalu Gupta, MGMCOET. 21
12/5/2021 Shalu Gupta, MGMCOET. 22
12/5/2021 Shalu Gupta, MGMCOET. 23
12/5/2021 Shalu Gupta, MGMCOET. 24
12/5/2021 Shalu Gupta, MGMCOET. 25
12/5/2021 Shalu Gupta, MGMCOET. 26
12/5/2021 Shalu Gupta, MGMCOET. 27
12/5/2021 Shalu Gupta, MGMCOET. 28
12/5/2021 Shalu Gupta, MGMCOET. 29
12/5/2021 Shalu Gupta, MGMCOET. 30
12/5/2021 Shalu Gupta, MGMCOET. 31
12/5/2021 Shalu Gupta, MGMCOET. 32

You might also like