Javascript2

Size
1,997 Kb
Views
26,312

How do I make an javascript2?

What is a javascript2? How do you make a javascript2? This script and codes were developed by Nugroho Indra Utomo on 17 October 2022, Monday.

Javascript2 Previews

Javascript2 - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>javascript2</title>
</head>
<body> <html>
<head>
<title>Untitled Document</title>
<script>	function validation()	{	var name = document.getElementById("name").value;	var age = document.getElementById("age").value;	var email = document.getElementById("email").value;	var error = document.getElementById("msg");	var email=document.getElementById("email").value;	var atpos=email.indexOf("@");	var dotpos=email.lastIndexOf(".");	var abc = "0123456789`~@#$%^&*()-_;:',.<>\\/";	var name = document.getElementById("name").value;	var Checkname;	var check = true;	for (i=0 ; i<name.length ; i++)	{	Checkname = name.charAt(i);	for (z=0;z<abc.length;z++)	{	if(Checkname==abc.charAt(z))	{	check=false;	break;	}	}	}	//Validasi Name	if(name == "")	{	error.innerHTML = "Name must be filled.";	return false;	}	else if(name.length < 4 || name.length > 20)	{	error.innerHTML = "Name must be between 4 to 20 characters.";	return false;	}	else if(check==false)	{	error.innerHTML = "Name must be alphabets.";	return false;	}	//Validasi Age	else if(age == "")	{	error.innerHTML = "Age must be filled.";	return false;	}	else if(isNaN(age))	{	error.innerHTML = "Age must be a number.";	return false;	}	else if(age.length<2 || age.lenght>2)	{	error.innerHTML = "Age must fill with 2 digit of number.";	return false;	}	//Validasi Email	else if	(email == "" && atpos<1 || dotpos<atpos+2 || dotpos+2>=email.length)	{	error.innerHTML = "Not a valid e-mail address.";	return false;	}	else	{	alert("Registration success");	}	}
</script>
</head>
<body>
<form action="#" onsubmit=" return validation()">
<table>	<tr align = "right">	<td width = "50%">	<label>Name : </label>	</td>	<td align = "left" width = "50%">	<input type="text" name="name" id="name"/>	</td>	</tr> <tr align = "right">	<td width = "50%">	<label>Age : </label>	</td>	<td align = "left" width = "50%">	<input type="text" name="age" id="age"/>	</td> <tr align = "right">	<td width = "50%">	<label>Email : </label>	</td>	<td align = "left" width = "50%">	<input type="text" name="email" id="email"/>	</td>	</tr> <tr>	<td align="center" colspan = "2">	<div id="msg" style="color:red;"></div>	</td>	</tr> <tr>	<td align = "right" width = "50%">	<input type="submit" value="Submit"/>	</td>	<td align = "left" width = "50%">	<input type="button" value="Cancel"/>	</td>	</tr>
</table>
</form>
</body>
</html>
</body>
</html>
Javascript2 - Script Codes
Javascript2 - Script Codes
Home Page Home
Developer Nugroho Indra Utomo
Username indra_z85
Uploaded October 17, 2022
Rating 3
Size 1,997 Kb
Views 26,312
Do you need developer help for Javascript2?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Nugroho Indra Utomo (indra_z85) Script Codes
Name
Fancy box effect
Responsive2
Jquery effect
Meiji
A Pen by nugroho indra utomo
Track2
Template
Task
Slider hover
Javascript only
Create amazing love letters with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!