Make edits, jquery and PHP, read the values from the background based on the ID, edit the previous checkbox and select, how to check the corresponding checkbox and option according to the values taken from the background,
Reply content:
Make edits, jquery and PHP, read the values from the background based on the ID, edit the previous checkbox and select, how to check the corresponding checkbox and option according to the values taken from the background,
测试
111
222
333
444
555
锤子 苹果 小米 诺基亚
Operation Result:
PHP I do not understand, but this can be based on your background to pass over the value of JS to write a judgment to decide which checkbox
or is select
going to be selected. Like what
if (a == 1) $("[name = yourcheckboxname]:checkbox").attr("checked", true);
The problem you describe is not clear ah, can you understand the Ajax to modify the data? If this is the case, that is, when choosing the option to start the onchange event, in this method, you can send a request to the background server, with the ID you read, processing and return a data structure, to take the value you need, use the idea of the upstairs to change the corresponding check selection status is OK