//Bind the event after live (get the generated object after dynamic generation)
If the value is equal to empty, add this tr to the background and change the value of the hidden field to the ID value of tr
.css("background", "#009900");
var a = $(this).attr('id');
/ Otherwise, change the background of this tr to white and change the value of the hidden field to empty
}else{
$(this).css("background", ''); attr("value", '');
}
});
The above introduces the jq post-binding click event, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.