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,

Source: Internet
Author: User
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

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.