???????????????$(document).on(‘input propertychange‘,‘.level‘,function(){
???????????????????var val = $(this).val();
???????????????????var ind = $(this).index(‘.level‘);
???????????????????var len = $(‘.level‘).length;
???????????????????for(var i =1 ; i<len; i++){
???????????????????????if(ind != i){
???????????????????????????if(val == $(‘.level‘).eq(i).val() ){
???????????????????????????????
???????????????????????????????that.errorMsg(‘不能重复输入‘);
???????????????????????????????$(this).val(‘‘);
???????????????????????????}
???????????????????????}
???????????????????};
???????????????});
js判断 不能重复输入相同的内容
原文地址:https://www.cnblogs.com/YHJUN/p/8303734.html