复制代码 代码如下:
function hasrepeat(objid,columnindex){
var arr = [];
$(#+objid+ tbody tr).each(function(){
arr.push( $(td:eq(+columnindex+),this).text() );
});
if( arr.length==$.unique( arr ).length ){
return false;
}else{
return true;
}
}
//调用
alert( hasrepeat(tableid,列索引)==1?有重复:无重复 );