$(function (){
$("#date").datebox({
onSelect: function () {
$(this).datebox("setValue",$(this).datebox("getValue").substring(0,7));
}
});
$("#zfjg").combotree({
url: '<%=basePath%>lawteambuild/inqueryZfjg.do?type=all',
editable:false
});
$("#submit").click(function (){
var d = $("#date").datebox("getValue");
if(d == ""){
alert("稽查日期必须输入");
return false;
};
if(! d.match(/[0-9]{4}-[0-9]{2}/)){
alert("稽查日期格式错误");
return false;
};
if($("#zfjg").combotree("getValue")==""){
alert("执法机构不能为空");
return false;
};
$("#searchfrom").submit();
});
});
</script>
<script type="text/javascript">
$(function (){
$("#submit").click(function (){
var sdate = $("input[name=sdate]").val();
var edate = $("input[name=edate]").val();
if(sdate==""){
alert("查询开始日期必须输入");
return false;
}
if(edate==""){
alert("查询结束日期必须输入");
return false;
}
if($("input[name=hy]").val()==""){
alert("行业不能为空");
return false;
};
if($("#zfjg").combotree("getValue")==""){
alert("执法机构不能为空");
return false;
};
});
function checkDate(date){
if(date == ""){
alert("查询日期必须输入");
return false;
}
if(! date.match(/[0-9]{4}-[0-9]{2}(-[0-9]{2})+/)){
alert("查询日期格式错误");
return false;
}
return true;
}
});
</script>