function Hidden_edit () { // Hide Edit Clerk $ (". Form-horizontal") [0].reset (); // The name value in the Reset form must correspond to the name value of the database, and when the return key is pressed, the contents of the form cannot be reset, and if an item name cannot be reset, it means that the name value in the database does not have a $ (". Y-edit"). css ("Display", "none"); $ (". Y-clerk"). CSS ("Display", "block"); }
<button type= "button" onclick= "Hidden_edit ()" class= "btn btn-success btn-s-xs" style= "margin-right:10px;" > Return </button> //type=button words will not be submitted the form needs to be reset button function submission form, if it is submit, will automatically submit the form, but in the case of a button function is set to repeat two times, But submit can be submitted with the ENTER key. So use the button to set the commit action separately <button type= "button" class= "btn btn-success btn-s-xs" id= "Submit" > Save </button>
<input type= "text" class= "Form-control y-i" name= "username" value= "{$data [' m_m_id ']}" disabled= "true" >// Background autofill input is worth writing value= "{$data [' name ']}" This data is a two-dimensional array one-dimensional array is value= "{$name}"
Minor issues encountered in resetting forms and submitting forms