求助,在线等待!!!
小弟初学ASP,正在做出勤管理系统还请多多指教。
以下功能实在是搞不定了
1,当选择年份或月份时天数会自动刷新:2004年2月29天
2005年2月28天
……
2,联动问题:当选择“无休”时“勤务时间”自动变成“00:00~00:00”
3,如何点击提交呀(点发送是想刷新个预览确定的新页面,然后再提交数据库)
<html>
<head><title> 勤怠表 </title></head>
<body bgcolor="#FFFFFF">
<form id=f>
<font size=6> </font>
<select id=year name=year>
<% for n = 2004 to 2008 %>
<option value= "<%=n%>"> <%=n%> </option>
<%next%>
</select> 年度
<select id=month name=month onchange="return month_onchange()">
<option>请选择月份 </option>
<% for m = 1 to 12 %>
<option value="<%=m%>"> <%=m%> </option>
<%next%>
</select> 月份の勤怠表 </form>
<Script LANGUAGE=VBScript>
function month_onchange()
MySelect=document.all("year")
with MySelect
sValue=options[selectedIndex].value;
end with
year=sValue
MySelect=document.all("month")
with MySelect
sValue=options[selectedIndex].value;
end with
month=sValue
end function
</Script>
<p><font size=2> </font>
<td class=p2 align=right> <font color=D11B00> </font> 日 </td>
<font size=2> </font>
<td class=p2 align=right> <font color=D11B00> </font> 勤务种类 </td>
<font size=2> </font>
<td class=p2 align=right> <font color=D11B00> </font> 勤务时间 </td>
<font size=2> </font>
<td class=p2 align=right> <font color=D11B00> </font> 备考 </td><br></p>
<Script LANGUAGE=VBScript>
select case month
case 1,3,5,7,8,10,12
getdays=31
case 4,6,9,11
getdays=30
case 2 '判断是否为闰年
if year mod 4=0 and year mod 100>0 or year mod 400=0 then
isrn=true
else
isrn=false
end if
if isrn=true then getdays=29 else getdays=28
case else
getdays=0
end select
dim day
day = 1
Do while day <= getdays
if day < 10 then
response.write (" 0" & day)
else
response.write (" " & day)
end if
</Script>
<font size=2> </font>
<select onchange= " " name=kind>''''''''''''''''''''''''''
<option value=1 selected> 通常 </option>
<option value=2> 有休 </option>
<option value=3> 无休 </option>
<option value=4> 代休 </option>
<option value=5> 代休出勤 </option>
<option value=6> 祝日(祭日) </option></select>
<font size=2> </font>
<select onchange= " " name=time>'''''''''''''''''''''''''''
<option value=" " selected> 9:00~18:00 </option>
<option value=" "> 9:30~18:30 </option>
<option value=" "> 00:00~00:00 </option>
</select><font size=2> </font>
<input type="text" name="bikou" size="20"> <br>
<Script LANGUAGE=VBScript>
if day > 31 then
exit do
end if
day = day + 1
Loop
</Script>
<form id=g>
<p><input type="submit" value=" 发送 " name="submit">
<input type="reset" value=" 重填 " name="reset"></p>
</form>
<%
For Each i In Request.Form("time")
Response.Write i & "<BR>"
Next
%>
</body>
</html>