直接借鉴的 ids拼接

  1. function _getIds(selectedIds, targetType){
  2. var ids = "";
  3. var $box = targetType == "dialog" ? $.pdialog.getCurrent() : navTab.getCurrentPanel();
  4. $box.find("input:checked").filter("[name='"+selectedIds+"']").each(function(i){ //注意each
  5. var val = $(this).val();
  6. ids += i==0 ? val : ","+val; //重点
  7. });
  8. return ids;
  9. }





posted on 2015-12-24 16:53  叫我小洋  阅读(271)  评论(0编辑  收藏  举报

导航