Javascript2
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 - 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>
Developer | Nugroho Indra Utomo |
Username | indra_z85 |
Uploaded | October 17, 2022 |
Rating | 3 |
Size | 1,997 Kb |
Views | 26,312 |
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!
Name | Size |
Fancy box effect | 19,982 Kb |
Responsive2 | 7,059 Kb |
Jquery effect | 2,139 Kb |
Meiji | 8,051 Kb |
A Pen by nugroho indra utomo | 7,925 Kb |
Track2 | 10,828 Kb |
Template | 2,323 Kb |
Task | 5,383 Kb |
Slider hover | 2,000 Kb |
Javascript only | 2,016 Kb |
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!
Name | Username | Size |
React Vote Component | Souporserious | 5,465 Kb |
RAQuote | Naderk007 | 4,412 Kb |
Learning FlexBox | Alex_rodrigues | 2,821 Kb |
Basecamp 3 Document | Lachlanjc | 3,811 Kb |
Tooltip in table | Roine | 3,713 Kb |
Fluid Responsive Typography | Jonmilner | 4,205 Kb |
Toolbar | Onsen | 5,414 Kb |
CSS Tooltips | Darylldoyle | 2,599 Kb |
Flex Chart | James_zedd | 4,111 Kb |
CSS Gem Badge | Orchard | 3,335 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!