casilla de verificación 批量选中, 获取选中项的值的简单实例
<! Doctype html> <html lang = "en"> <head> <meta charset = "utf-8"> <title> document </title> <script type = "text/javaScript" src = "jQuery.js"> </script> </head> <body> <viD = "table"> <table id = "Personlist"> <tr> <tr> <TH> <TH> <TH> <TH> type = "CheckBox" name = "AllCheck" onClick = "Fun ()"> </pip> </th> <th> name </th> <th> Age </th> <th> país </th> </tr> <tr> <tr> <td> 1 </td> <th> <input type = "checkbox" name = "checkme" id = "A"> </put> </th> <td> asan </td> <td> 32 </td> <td> China </td> </tr> <tr> <td> 2 </td> <th> <input type = "checkbox" name = "checkme" id = "b3e"> </put> </th> <td> hon </td> <td> 30 </td> <td> jp </td> </tr> <tr> <td> 3 </td> <th> <input type = "checkbox" name = "checkme" " id = "cdd"> </put> </th> <td> jhone </td> <td> 27 </td> <td> usa </td> </tr> </table> </div> <input type = "button" value = "" onclick = "s ()" id = "qw" name = "aaa"/> <scrito> función divertida () {var obj = document.getElementsByName ("checkMe"); var arr = new Array (); for (var i = 0; i <obj.length; i ++) {obj [i] .click (); arr [i] = $ (obj [i]). document.getElementsByName ("checkMe"); var arr = []; for (var i = 0; i <obj.length; i ++) {if ($ (obj [i]). is (': checked')) {var id = $ (obj [i]). parent (). Siblings (). Primero (). $ (obj [i]). Parent (). Siblings (). Eq (1) .Text (); var enve , edad: "+edad+", país: "+país); // alerta (" $ (obj [i]): "+$ (obj [i])+", id: "+$ (obj [i]). id+", nombre: "+$ (obj [i]). name)}}} </script> </body> </html>以上就是小编为大家带来的 casilla de verificación 批量选中, 获取选中项的值的简单实例全部内容了 希望大家多多支持武林网 ~