JavaScript

Javascript form validation

<!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <meta http-equiv=”X-UA-Compatible” content=”ie=edge”> <title>Javascript form validation</title> </head> <body> <script> function validateform() { var name = document.singinform.name.value; var password = document.singinform.password.value; if (name == null || name == “”) { document.getElementById(“error”).innerHTML = “Name Can’t be blank”; return false; } else if (password.length < 6) {…

Read More