javascript - How to use checkbox to filter out values ​​that meet conditions? ?
学习ing
学习ing 2017-06-08 11:02:31
0
3
909

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?

学习ing
学习ing

reply all(3)
習慣沉默

Use regular /^ESC/ to judge each one, and then use show hide to process it. Or indexOf()==0 is the beginning.

淡淡烟草味

Determine whether it is selected: $("input[type='checkbox']").is(":checked"),
If it is selected and consistent with the parameters, just perform the corresponding display.

刘奇

Can be judged by $("input:checkbox:checked")

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template