急!文本框中默认值的问题
下面的语句是从库中提取条件记录显示在一个表格中,其中年度和月份插入了文本框,我想在年度栏中直接显示出当前年度,月份栏中显示库中提取的月份数值,应该怎样修改?请各位指教,谢谢<%
Sub ShowHeader(tabletitle)
Response.Write("<p>[<b>" & tabletitle & "</b>]")
Response.Write("<table border='1' width='80%'>")
Response.Write("<tr align='left'>")
Response.Write("<th width='25%'>项目</th>")
Response.Write("<th width='25%'>年度</th>")
Response.Write("<th>月份</th>")
Response.Write("</tr>")
End Sub
'生成文本框控件
Sub ShowTextBox(tbname, i, tbmaxlen)
Response.Write("<td><input type=text size=16")
Response.Write(" name=" & tbname & i)
Response.Write(" maxlength=" & tbmaxlen)
Response.Write("></td>")
End Sub
'显示相关记录
If rs.RecordCount > 0 Then
Call ShowHeader("录入数据")
For i = 1 To rs.RecordCount
Response.Write("<tr>")
Response.Write("<td>" & rs("tj_xm") & "</td>")
Call ShowTextBox("nd", i ,4)
Call ShowTextBox("yf", i, 2)
Response.Write("</tr>")
rs.MoveNext
Next
Response.Write("</table>")
qs1=true
End If
If Not qs1 Then msg = "数据库没有当前记录"
If msg = "" Then
Response.Write("<p><hr>")
Response.Write("<input name=reg type=button value=提交数据> ")
Response.Write("<input type=reset value=重置数据>")
Else
Response.Write("<p><font color=red>" & msg & "</font>")
End if
rs.Close
Set rs = Nothing
%>