function OkSubmit(objName)
{
var Title = $('#Title').val();
var Content = $('#Content').val();
var DealTime = $('#DealTime').val();
var Title = $.trim(Title);//过滤首尾的空格
var Content = $.trim(Content);
var DealTime = $.trim(DealTime);
var TitleLong = $('#Title').val().length;
if(200 < TitleLong){
alert("标题字数须小于100字");//限定标题的长度
return false;
}
if(Title == "" || Content == "" || DealTime ==""){
alert("请完整填写内容!");
return false;
}
//必须是2005-05-09这种格式,2005-5-5这种格式也不行。
var reg = /[0-9]{4}\-[0-9]{2}\-[0-9]{2}/;
if (!reg.exec(DealTime)){
alert("请按指定格式的日期填写");
return false;
}
var che1 = $(".che1").attr("checked");
var che2 = $(".che2").attr("checked");
var che3 = $(".che3").attr("checked");
//如果这三个值都是false,就证明没有选择,提示选择
if(false== che1 && false== che2 && false== che3){
alert("请至少选择一个平台");
return false;
}
$("input[@type=checkbox][@checked]").each(function(){ //由于复选框一般选中的是多个,所以可以循环输出
$('#form1').submit();
return; });
}