1,获取select中选中的option值:$('#year').find('option:selected').val();
设置dom的值document.getElementById("month").value=month;
2,对表格的遍历操作:
var tab = document.getElementById('calendar');
for (var i=1; i < tab.rows.length; i++){
for (var j=1;j< tab.rows.item(i).cells.length;j++) {
tab.rows.item(i).cells[j].innerHTML = "";
}
}
3,ajax请求:
$.ajax({
type: "post",
async:false,
url: "/es/Pages/dutyScheme/zhbgl/EvnEtsDutyschemeAction_findDutyscheme.action",
data:{
"date1":dat,
"month":month,
"year":year
},
success:
function(data){
if(data.dutyscheme!=null){
showDate2(j,k,data,dat);
}
},
error:function(data){
//alert("请导入本月的排班表");
alert("请导入本月份工作表")
return orderNum;
}
});
设置dom的值document.getElementById("month").value=month;
2,对表格的遍历操作:
var tab = document.getElementById('calendar');
for (var i=1; i < tab.rows.length; i++){
for (var j=1;j< tab.rows.item(i).cells.length;j++) {
tab.rows.item(i).cells[j].innerHTML = "";
}
}
3,ajax请求:
$.ajax({
type: "post",
async:false,
url: "/es/Pages/dutyScheme/zhbgl/EvnEtsDutyschemeAction_findDutyscheme.action",
data:{
"date1":dat,
"month":month,
"year":year
},
success:
function(data){
if(data.dutyscheme!=null){
showDate2(j,k,data,dat);
}
},
error:function(data){
//alert("请导入本月的排班表");
alert("请导入本月份工作表")
return orderNum;
}
});