Front-end common summary

Splicing forms and forms, submitting forms and parameters to the background:

var param= $('#form1').serialize()+'&'+$('#form2').serialize();

var param= $('#leaveprojectadd_form').serialize()+'&check=save';

Determine if a class contains:

if($('input').is('.onlyinput')){}

if($('input').hasClass('.onlyinput')){}

Add or delete a class:

$('.onlyinput').addClass('onlyinput');

$('.onlyinput').removeClass('onlyinput');

jQuery loops the json array passed from the background

$.each( data, function(index, lea)
{
    alert( "the man's no. is: " + index + ",and " + lea.xmid);
});

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325654822&siteId=291194637