首页 > Web开发 > 详细

项目总结 js

时间:2017-12-12 19:00:05      阅读:192      评论:0      收藏:0      [点我收藏+]

1. 多选框遍历

  $("tr").each(function(i){
    ....

    i 为遍历的每一个元素
  });

2. 遍历选中的多选框

$("input[name=‘id‘]:checked").each(function(i){
console.log("$(this).checked == true: "+$(this).checked == true);
console.log("i: "+i);
ids += $(this).attr("id") + ",";
})


 

项目总结 js

原文:http://www.cnblogs.com/wangzhaoshuang/p/8028602.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!