获取选中的checkbox的value

 //获取选中的checkbox的value

          function GetProjectIDs()

          {

              var ProjectIDs = "";

              var tbodyObj = document.getElementById('table');

              $("table :checkbox").each(function (key, value) {

                  if ($(value).prop('checked')) {

                      ProjectIDs += "'" + $(this).attr('value') + "',";

                  }

              });

              return ProjectIDs.substring(0, ProjectIDs.length - 1);

          }

猜你喜欢

转载自blog.csdn.net/qq_20426717/article/details/88757171