After the 1.form form is submitted, continue to keep the original value entered
<HTMLxmlns= "http://www.w3.org/1999/xhtml"><Headrunat= "Server"> <MetaCharSet= "UTF-8"> <title>The value that remains entered after the form form is submitted</title></Head><Body> <formclass= "Form-horizontal"Method= "POST"Action="#"onsubmit= "return check (this)"> <Divclass= "Form-group"> <label for= "InputEmail3"class= "Col-sm-3 Control-label">Title:</label> <Divclass= "Col-sm-8"> <inputtype= "text"class= "Form-control"ID= "Title_name"placeholder= "Please enter the post title you want to add"Required MaxLength= "Ten"> </Div> </Div> <Divclass= "Form-group"> <label for= "InputEmail3"class= "Col-sm-3 Control-label">Content:</label> <Divclass= "Col-sm-8"> <textareatype= "text"rows= "3"class= "Form-control"ID= "Content"placeholder= "Please enter the announcement content to be added"maxlength= "+"></textarea> </Div> </Div> <Divclass= "Form-group"> <Divclass= "Col-sm-offset-3 col-sm-8"> <inputtype= "Submit"class= "Btn btn-primary"value= "Create device Submission"ID= "Load"onkeyup= "Xiaoha ();"> </Div> </Div> </form> <Scriptlanguage= "JavaScript"> //declares a global array for storing values varInputarr=document.getElementsByTagName ("input"); functionCheck (o) {varnameStr= ""; for (varI= 0; I<Inputarr.length-1; I++) {nameStr+=Inputarr[i].value+ ";"; } nameStr+=Inputarr[inputarr.length- 1]; Window.name=nameStr; } if(window.name) {//declares an array that holds the values separated from the Window.name varNamearr= NewArray (); Namearr=Window.name.split (";"); for (varI= 0; I<namearr.length; I++) { if(Inputarr[i].type== "text") {Inputarr[i].value=Namearr[i]; } } }</Script></Body></HTML>
The value that remains entered after the form form is submitted