【发布时间】:2017-11-17 18:03:07
【问题描述】:
我的 Web 应用程序中有一个 html 页面,其中有多个表单和表格。 在下面的列中,“广告 ID”是必须填写的。
<table id="mf-table" class="table table-hover">
<tbody>
<tr>
<th>File Name</th>
<th>Duration</th>
<th>Category</th>
<th>Comment</th>
<th>Advert Name</th>
<th>Advert Id</th>
</tr>
上表内容待补充。
我想检查 Advert Id 列下的所有单元格是否都已填满。如果不是,我想获取相关条目的广告名称。
目前我可以检查表格中是否有内容,如果没有则显示警告。
function saveAdminStatusAndTR(){
var rowCount = $('#mf-table tr').length;
if(rowCount == 1){ //case where there is no content in the table
toastr.error('No media file has been uploaded', 'Approval Status');
}else if(...){ //one of the cell under advert id is empty
// Need to show a warning message indicating the advert names
where there is no advert id
}else{
//my code here
}
}
谁能帮我解决这个问题?
【问题讨论】:
-
我能知道投反对票的原因吗?
标签: javascript jquery html html-table