Js form

Size
1,753 Kb
Views
22,264

How do I make an js form?

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

Js form Previews

Js form - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>js form</title>
</head>
<body> <html>
<head>
<title>Form Validation</title>
<script type="text/javascript">
<!--
function validateEmail()
{ var emailID = document.myForm.EMail.value; atpos = emailID.indexOf("@"); dotpos = emailID.lastIndexOf("."); if (atpos < 1 || ( dotpos - atpos < 2 )) { alert("Please enter correct email ID") document.myForm.EMail.focus() ; return false; } return( true );
}
function validate()
{ if( document.myForm.Name.value == ""||document.myForm.Name.value.length< 4 ) { alert( "Please provide your name correctly!" ); document.myForm.Name.focus() ; return false; } if( document.myForm.Age.value == "" || isNaN( document.myForm.Age.value ) || document.myForm.Age.value.length > 2 || document.myForm.Age.value.length < 2 ) { alert( "Please provide your Age correctly!" ); document.myForm.Age.focus() ; return false; } if( document.myForm.EMail.value == "" ) { alert( "Please provide your Email correctly!" ); document.myForm.EMail.focus() ; return false; }else{ // Put extra check for data format var ret = validateEmail(); if( ret == false ) { return false; } else { alert( "Success" ); } }
}
//-->
</script>
</head>
<body> <form name="myForm" onsubmit="return(validate());"> <table cellspacing="2" cellpadding="2" border="1"> <tr> <td align="right">Name</td> <td><input type="text" name="Name" /></td> </tr> <tr> <td align="right">Age</td> <td><input type="text" name="Age" /></td> </tr> <tr> <td align="right">EMail</td> <td><input type="text" name="EMail" /></td> </tr> <tr> <td align="right"></td> <td><input type="submit" value="Submit" /></td> </tr> </table> </form> </body> </html>
</body>
</html>
Js form - Script Codes
Js form - Script Codes
Home Page Home
Developer Nugroho Indra Utomo
Username indra_z85
Uploaded October 17, 2022
Rating 3
Size 1,753 Kb
Views 22,264
Do you need developer help for Js form?

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
Template
Track2
JQuery Dropdown Menu
Fancy box effect
Meiji
Task
Jquery effect
Club t
Responsive2
Slider hover
Create amazing video scripts 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!