Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taichunmin/88c2e13c9eb262a45abe to your computer and use it in GitHub Desktop.
Save taichunmin/88c2e13c9eb262a45abe to your computer and use it in GitHub Desktop.
var $trtd = $('table tr:has(td)');
var tai_title = [];
$("[name=item_ids]").click();
$('.btn-success[type=submit]').val('新增('+$trtd.has(':checkbox:checked').length+')');
$.each( $trtd, function(k,v){
var $this = $(this);
var title = $this.find('td:eq(2)').text().trim();
var ba = false;
for( j=0; j<tai_title.length;j++ )
if( tai_title[j]==title )
ba = true;
if(!ba)
tai_title.push(title);
else $this.css('background-color','gold');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment