SmileUpdates
  • Home
  • Top 10
  • Apps
  • Blog
  • TECHNOLOGY
  • Programming
No Result
View All Result
  • Home
  • Top 10
  • Apps
  • Blog
  • TECHNOLOGY
  • Programming
No Result
View All Result
SmileUpdates
No Result
View All Result
Home Programming

Student Registration Form Validation Using HTML and JavaScript

Dineshkumar by Dineshkumar
October 21, 2020
in Programming
0
0
SHARES
31
VIEWS
Share on FacebookShare on Twitter

Table of Contents

Toggle
  • Simple Form Validation Using HTML and JavaScript  
    • 1.File Name [Student.html]
      • OUTPUT
      • How To Run the Program

Simple Form Validation Using HTML and JavaScript  

In this post, we can learn about a simple student registration form in HTML with javascript validation form using the javascript program. Simple and basic Code using this Form Validation.

These are easily created by HTML code with Javascript. In this form you can check the user input information is correct or wrong using javascript code to avoid wrong information about the user. 

We should use simple editor software like Sublime Text or Notepad++ etc…

1.File Name [Student.html]

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html>
<head>
	<title>Html Form page</title>

<script>
	function validateform(){
		var fname = document.form.fname.value;
		var lname = document.form.lname.value;
		var age = document.form.age.value;
		var email =document.form.email.value;
		var emailformat =  /^w+([.-]?w+)*@w+([.-]?w+)*(.w{2,3})+$/; 
		if (fname =="") {
			alert("Pleas Fill  firstname");
			document.form.fname.focus();
			return false;
		}
		else if(lname == ""){
			alert("please Fill last name")
			document.form.lname.focus();
			return false;

		}
		else if (age =="") {
			alert("please Fill AGE")
			document.form.age.focus();
			return false;

		}
		else if (email =="") {
			alert("please Fill email")
			document.form.email.focus();
			return false;
		}
		}
		
		function onfocuscolor(){
			document.getElementById("address").style.background="yellow"; 

		} 
     </script>
</head>
<body>
<h1 align="center">STUDENT REGISTRATION FORM</h1>  

<form name="form" action="register.html" method="post" onsubmit=" return validateform()">
	
         <label for="fname"><b>1.FIRST NAME:</b></label>
         <input type="text" id="fname" name="fname"><br><br>
         <label for="lname"><b>2.LAST NAME:</b></label>
         <input type="text" id="lname" name="lname"><br><br>
         <label for="age"><b>3.YOUR AGE:</b></label>
         <input type="text" id="age" name="age" onkeyup="numbersonlyallwed(this)"><br><br>
         <label for="email"><b>4.EMAIL ID:</b></label>
         <input type="email" id="email" name="email"><br><br>
         <label for="birthday"><b>5.DATE OF BIRTH</b></label>
		 <input type="date" id="birthday" name="birthday"><br><br>
		<label><B>6.GENDER</B></label><br>
		<input type="radio" id="gender" name="gender" value="Male"/>Male<br>
		<input type="radio" id="gender" name="gender" value="Female"/>Female<br>
		<input type="radio" id="gender" name="gender" value="Other"/>Other<br><br>
		<label><B>7.CHOOSE YOUR DEPARTMENT</b></label>
  <select>
    <option value="volvo">B.TECH (IT) </option>
    <option value="saab">BE (MECH)</option>
    <option value="fiat">BE (CIVIL)</option>
    <option value="audi">BE (ECE)</option>
  </select><br><br>
  <label for="number"><b>8.COLLAGE NAME:</b></label>
		 <input type="text" id="collage_name" name="collage_name"><br><br>
  <label for="number"><b>9.MOBILE NUMBER:</b></label>
		 <input type="text" id="number" name="number"><br>
		
	<br><B>10.ENTER YOUR ADDRESS</b><br>
		<textarea id="address" onfocus="onfocuscolor()"></textarea><br><br>
		<input type="submit" value="REGISTRATION"><br><br>
</form>
</body>
</html>

OUTPUT

How To Run the Program

Step 1: Copy this code.

Step 2: Paste Your favorite  Code editor Like Notepad etc,,

Step 3: Save the file .html

Step 4: Finally run the program in your browser.

Click Here
Previous Post

How to Reset Canara Bank ATM Pin through Green PIn or Online Banking

Next Post

Make a Simple JavaScript Quiz Program examination

Next Post

Make a Simple JavaScript Quiz Program examination

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected test

  • 23.9k Followers
  • 99 Subscribers
  • Trending
  • Comments
  • Latest
Best Temporary Sites

Top 10 Best Temporary Mail Sites

April 11, 2024
free google drive unlimited storage

How To Get Free Google Drive Unlimited Storage

April 9, 2024
Hotstar Premium Accounts

Free Disney Plus Hotstar Premium Accounts Telegram

March 16, 2024

Student Registration Form Validation Using HTML and JavaScript

October 21, 2020
how to get free money on cash app

How to Get Free Money on Cash App

0
How to Create an eBook to Sell on Amazon

How to Create an eBook to Sell on Amazon

0
How to Make Money on Pinterest

How to Make Money on Pinterest Without a Blog

0
How to Easily Make 30$ Money An Hour

How to Easily Make 30$ Money An Hour

0
myfastbroker trading platforms

Exploring MyFastBroker Trading Platforms: The Ultimate Guide for Traders

October 26, 2024
Best Micro SD Card Readers for Android

Best Micro SD Card Readers for Android

October 26, 2024
Grammarly AI vs ChatGPT: Which Is Better

Grammarly AI vs ChatGPT Which Is Better?

October 22, 2024
Best Paraphrasing Tools to Avoid AI Detection

Best Paraphrasing Tool To Avoid AI Detection

October 20, 2024

Recent News

myfastbroker trading platforms

Exploring MyFastBroker Trading Platforms: The Ultimate Guide for Traders

October 26, 2024
Best Micro SD Card Readers for Android

Best Micro SD Card Readers for Android

October 26, 2024
Grammarly AI vs ChatGPT: Which Is Better

Grammarly AI vs ChatGPT Which Is Better?

October 22, 2024
Best Paraphrasing Tools to Avoid AI Detection

Best Paraphrasing Tool To Avoid AI Detection

October 20, 2024
Smileupdates

This website will be Provided Programming Tips, Top 10 Facts about Technology, Education Study Materials, New Technology Latest Updates, and How to do it Related Content in Technology.

Follow Us

Pages

  • About Us
  • Contact Us
  • Disclaimer
  • Home
  • Privacy Policy
  • Terms and Conditions

Recent News

myfastbroker trading platforms

Exploring MyFastBroker Trading Platforms: The Ultimate Guide for Traders

October 26, 2024
Best Micro SD Card Readers for Android

Best Micro SD Card Readers for Android

October 26, 2024

© 2024 SmileUpdates. All rights reversed By SmileUpdates

No Result
View All Result
  • Apps
  • How To ?
  • Programming
  • TECHNOLOGY
  • courses

© 2024 SmileUpdates. All rights reversed By SmileUpdates