老师们:
(见下面代码)在“ARRIVETIME”中我选择时间“<%=time()%>”来判断,在“ARRIVEQK”中显示“已到”和“迟到”没问题;但是,如果我在“ARRIVETIME”中选择“出差”、“病假”或是“事假”等时,在“ARRIVEQK”中还是显示“迟到”
问题就出在这了,我恳求各位老师帮忙:当我在“ARRIVETIME”中选择“出差”、“病假”或是“事假”等时,在“ARRIVEQK”中也是显示相应的“出差”、“病假”或是“事假”,而不是显示“迟到”。王各老师帮帮忙了。
问题就出在这了
<body onload="ARRIVE_TIME(document.frm.ARRIVEDATE.value,document.frm.ARRIVETIME.value,document.frm.ARRIVEQK)" >
<select name="ARRIVETIME" id="ARRIVETIME">
<option value="<%=time()%>" ><%=time()%></option>
<option value="出差">出差</option>
<option value="补休">补休</option>
<option value="病假">病假</option>
<option value="事假">事假</option>
<option value="旷工">旷工</option>
</select>
<input name="ARRIVEQK" type="text" id="ARRIVEQK"
<%if rs("ARRIVEQK")=true then%>
已到
<%else%>
<font color="#FF0000">迟到</font>
<%end if%> >
</body>
<script language="JavaScript" >
function ARRIVE_TIME(ARRIVEDATE,ARRIVETIME,ARRIVEQK)
{
var a="true";
var b="false";
var c="5:00:00";
var d="8:35:59";
if ((ARRIVETIME>d)||(ARRIVETIME<c ))
{
ARRIVEQK.value=b;
return false;
}
else
{
ARRIVEQK.value=a;
return false;
}
}
</script>
<body onload="ARRIVE_TIME(document.frm.ARRIVEDATE.value,document.frm.ARRIVETIME.value,document.frm.ARRIVEQK)" >
<select name="ARRIVETIME" id="ARRIVETIME">
<option value="<%=time()%>" ><%=time()%></option>
<option value="出差">出差</option>
<option value="补休">补休</option>
<option value="病假">病假</option>
<option value="事假">事假</option>
<option value="旷工">旷工</option>
</select>
<input name="ARRIVEQK" type="text" id="ARRIVEQK"
<%if rs("ARRIVEQK")=true then%>
已到
<%else%>
<font color="#FF0000">迟到</font>
<%end if%> >
</body>
<script language="JavaScript" >
function ARRIVE_TIME(ARRIVEDATE,ARRIVETIME,ARRIVEQK)
{
var a="true";
var b="false";
var c="5:00:00";
var d="8:35:59";
if ((ARRIVETIME>d)||(ARRIVETIME<c ))
{
ARRIVEQK.value=b;
return false;
}
else
{
ARRIVEQK.value=a;
return false;
}
}
</script>
[此贴子已经被作者于2006-12-13 17:09:03编辑过]