I have several checkboxes in the front desk, and when I want to click on the first checkbox, I compare it with a parameter in the data passed from the background. If it matches the first checkbox, I will display it. . . Please tell me, how to implement this function
The parameters in the data requested by ajax include flight, and the checkbox option is China Eastern Airlines. If you want to select China Eastern Airlines, display the data starting with CES in the flight on the page. . . Please tell me how to achieve it, gods. Can you teach me?
習慣沉默2017-06-08 11:04:31
Use regular /^ESC/ to judge each one, and then use show hide to process it. Or indexOf()==0 is the beginning.
淡淡烟草味2017-06-08 11:04:31
Determine whether it is selected: $("input[type='checkbox']").is(":checked"),
If it is selected and consistent with the parameters, just perform the corresponding display.