Finishing the front-end JS notes the first article!
Form form Submission
$ (". Submit"). Removeattr. (' onclick '); $ (' [name= ' form table sole name "]"). Submit;
Gets the ID of input
$ (' #id '). Val ();
Get the name of input
$ (' [name= ' name value '] '). Val ();
Each method matches the function specified by the element for each element
$ ("Li"). each (function ()) {}//For Li label matching this method
The Attr method returns the value of the property that sets the selected element
$ ("img"). attr ("width", "180");
The checkbox represents the HTML selection box
To perform a delete for the INPUT element matching method
var flag = 0;$ (' input:checkbox[name= "id[]"]:checked "). each (function (i) {flag = 1;}); if (flag = = 0) {alert (' Please select the data to be deleted '); return false;} Gets the form form execution method $ ("Form[name= ' OrderForm ')"). attr (' action ', ' {URL: The address of the Delete method} '); Confirm (' Are you sure you want to delete the selected data? ', ' Formsubmit (\ ' orderform\ ');
Json::encode converting an array to JSON data
JSON ($array) converts an array to a string
jquery function application and form validation processing encountered in development