layUi 单元格编辑判断 iframe 表格某一列是否为空

var flagType =false;
			var flagWeek =false;

			$.each($("#monthDevice").contents().find("tr"),function (index,item) { 
				if (index > 0) { 
					var maintainTypeName = "";
					var week ="";

					$.each($(item).find("td"),function (i,obj) { 
						if (obj.dataset.field == "maintainTypeName") { 
							maintainTypeName = obj.textContent;
							if (maintainTypeName == "") { 
								flagType = true;
							}
						}
						if (obj.dataset.field == "week") { 
							week = obj.textContent;
							if (week == "") { 
								flagWeek = true;
							}
						}

					})
				}

			});

			if(flagType){ 
				layer.msg("维检修类别不能为空!", { icon: 5});
				return false;
			}

			if(flagWeek){ 
				layer.msg("周不能为空!", { icon: 5});
				return false;
			}
    原文作者:liufeihuwudi
    原文地址: https://blog.csdn.net/liufeihuwudi/article/details/107928541
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞