$(function() {
$("#tabs").tabs({
active:0,
disabled:[1,2]
});
$('.next').click(function(){
switch(parseInt($(this).attr('index'))){
case 1: step1();break;
}
$("#tabs").tabs('disable',+$(this).attr('index')-1);
$("#tabs").tabs('enable',+$(this).attr('index'));
$("#tabs").tabs("option", "active" ,+$(this).attr('index'));
});
$('.prev').click(function(){
$("#tabs").tabs('disable',$(this).attr('index')-1);
$("#tabs").tabs('enable',$(this).attr('index')-2);
$("#tabs").tabs("option", "active" ,$(this).attr('index')-2);
});
});
function step1(){
if($("#scheduleName").val()==''){
alert("档期名称不能为空!");
$("#scheduleName").focus();
return false;//为何这句没有执行?
}
$.post('saveData.asp',{act:'addSchedule'
,ScheduleName:$("#scheduleName").val()
,startDate:$("#startDate").val()
,endDate:$("#endDate").val()
,pic:$("#pic").val()
,memo:$("#memo").val()
,rnd:new Date().getTime()},function(msg){alert(msg);//为何alert,浏览器无反应?});
}