$('tr').each(function(){ if($(this).attr('id')!=null){ var s = $(this).attr('id').slice(9); console.info("正在删除:"+s); deletePost(s); } }); window.location.reload();