<!DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd "><HTML><Head> <MetaCharSet= "UTF-8"/> <title>Title</title> <style>. Error{Color:Red; } </style></Head><Body><formID= "FF"Method= "POST"> <Div><inputtype= "text"/></Div> <Div><inputtype= "Password"/></Div> <Div><inputtype= "text"/></Div> <Div><inputtype= "text"/></Div> <Div><inputtype= "text"/></Div> <Div><inputtype= "Submit"value= "Submit"/></Div></form><Scriptsrc= "Jquery-1.12.4.js"></Script><Script> $(': Submit'). Click (function () { $('. Error'). Remove ()varFlag= true; $('#ff'). Find ('input[type= "text"],input[type= "password"]'). each (function () { varTag= $( This). Val (); if(Tag.length<= 0) {flag= false; varv=Document.createelement ('span'); V.innerhtml= 'must fill in'; V.classname='Error'; $( This). After (v)return false//only prompt for the first return false } }) returnFlag; })</Script></Body></HTML>
Submit Form Validation
Python: Form validation-validation of each input box