複選框批量選中,獲取選中項的值的簡單實例
<! doctype html> <html lang =“ en”> <head> <head> <meta charset =“ utf-8”> <title> </title> </title> <腳本> <腳本> <script text/javascript“ src =” src =“ jquery.js”> </script> </script> </script> </head> </head> type =“複選框” name =“ allCheck” onclick =“ fun()”> </input> </th> <th> name </th> </th> </th> </th> </th> <th> country </th> </th> </th> </tr> <tr> <tr> <tr> </td> 1 </td> </td> <th> <th> <th> id =“ a”> </input> </th> <td> asan </td> <td> 32 </td> <td>中國id =“ b3e”> </input> </th> <td> id =“ cdd”> </input> </th> <td> document.getElementsByname(“ checkme”); var arr = new array(); for(var i = 0; i <obj.length; i ++){obj [i] .click(); arr [i] = $(obj [i] = $(obj [i]) document.getElementsByname(“ checkme”); var arr = []; for(var i = 0; i <obj.length; i ++){if($(obj [i])。is(':':':':checked')){var id = $(obj [obj [i])。 $(obj [i])。parent()。siblings()。eq(1).text(); var age = $(obj [i])。parent()。erblings()。eq(2).text().text().var country = $(obj [obj [i])。 ,年齡:“+age+”,國家:“+country); // alert(“ $(obj [i]):“+$(obj [i])+“,id:”+$(obj [i])。以上就是小編為大家帶來的複選框批量選中,獲取選中項的值的簡單實例全部內容了,希望大家多多支持武林網〜