驗證查詢條件 起始時間和終止日期

2021-04-20 16:40:54 字數 781 閱讀 9403

function selectsubmit()

//  if(invaliddepname == "")

//1.拿到當前選中的條件各選項的值

var startdate = document.getelementbyid("startdate").value;

var enddate = document.getelementbyid("enddate").value;

var dutyid = document.getelementbyid("dutyid").value;

//2.確定使用者至少選擇一項

if(startdate == "" && enddate == "" && dutyid == "")

//3.判斷起時間和止時間的大小

if(startdate != "" && enddate != "") 

}//4.決定是否提交

var url = "<%=request.getcontextpath()%>/runondutycheckinhandwordquerylist.do?startdata="+startdata+"&enddata="+enddata+"&dutyid="+dutyid;

parent. bottomframe.location.href = url;       //定位查詢結果的顯示位置

/runondutycheckinlist.do" id="bottomframe" frameborder=0 scrolling=no  style="width:100%;height:600px;">

java mysql 條件查詢日期時間

1 查詢當天的記錄 select from hb article view where to days hb addtime to days now 查詢當前這週的資料 select name,submittime from enterprise where yearweek date format...

SqlServer查詢日期時間範圍條件

查詢當天 select from info where datediff dd,datetime,getdate 0 查詢24小時內的 select from info where datediff hh,datetime,getdate 24 本月記錄 select from 表 where da...

實現日期的遍歷(傳入起始時間和結束時間)

目前提供的介面並非是傳入的引數為時間段,而是傳入的引數以天為單位,所以這時候就需要時間遍歷查詢,這時如何實現傳入起始時間和結束時間,這時可以得到這段時間內遍歷每天的時間表示 if startdate null enddate null stringutils.isnotblank startdate...