?//begin? 判断所选条目日期是否为同一天(haihang--zhangmiao)
?var? rows = document.getElementById("t_contract").rows;?????//t_contract为表的id
?var? dates = new Array();
?var m = 0;
?for(var i=1;i<rows.length;i++){
??? if(rows[i].cells[0].children[0].checked)
??? {
???????? var? value = rows[i].cells[0].children[0].value;
???????? var? redate = document.getElementById("redate_" + value).innerText;?//要判断日期td加上id
???????? for (var j = 0; j < dates.length; ++j){
????????????? if (redate != dates[j]){
??????????????? alert("所选票据转帖日期必须是同一天!");
??????????????? return false;
????????????? }
??????????? }
??????????? dates[m++] = redate;
??????????
??? }
?}
?//end
详细解决方案
js判断所抉择的行中某一列时候为同一个值
热度:106 发布时间:2012-08-21 13:00:21.0
相关解决方案