二级联动菜单问题
日期可以写出来,但是单号写不出来,大家帮我看看,有什么问题。<SCRIPT LANGUAGE="JavaScript">
function setdh() {
switch (document.kf.t4.value) {
case '<%=formatDateTime(date())%>':
var labels ='<%=a(0)%>';
var values ='<%=a(0)%>';
break;
case '<%=formatDateTime(date()-1)%>':
var labels ='<%=a(1)%>';
var values ='<%=a(1)%>';
break;
case '<%=formatDateTime(date()-2)%>':
var labels = '<%=a(2)%>';
var values = '<%=a(2)%>';
break;
case '<%=formatDateTime(date()-3)%>':
var labels ='<%=a(3)%>';
var values ='<%=a(3)%>';
break;
case '<%=formatDateTime(date()-4)%>':
var labels = '<%=a(4)%>';
var values = '<%=a(4)%>';
break;
}
document.kf.dh.options.length = 0;
document.kf.dh.add(document.createElement("OPTION"));
document.kf.dh.options[0].text=labels;
document.kf.dh.options[0].value=values;
document.kf.dh.selectedIndex = 0;}
</script>
<body>
<BR><CENTER><span class=d>销售订单</span></center>
<form name="form1" method="post" action="x1addsave.asp" onsubmit="return check(this)">
<table>
<td>日期 </td><td width=150>
<% If request("tt")=1 And session("dh")<>"" Then
response.write "<font color=#4B7EA9>"&rs3("x14")&"</font>"
%><input type=hidden name=t4 value=<%=rs3("x14")%>>
<%Else%>
<SELECT NAME="t4" OnChange="setdh()">
<OPTION value=<%=formatDateTime(date())%>SELECTED><%=Date()%></OPTION>
<OPTION VALUE=<%=formatDateTime(date()-1)%>><%=Date()-1%></OPTION>
<OPTION VALUE=<%=formatDateTime(date()-2)%>><%=Date()-2%></OPTION>
<OPTION VALUE=<%=formatDateTime(date()-3)%>><%=Date()-3%></OPTION>
<OPTION VALUE=<%=formatDateTime(date()-4)%>><%=Date()-4%></OPTION>
</SELECT>
<%End if%>
<td width=40>单号 </td>
<%if tt="" then%>
<td><SELECT NAME="dh"></SELECT></td>
<%
End if
%>
</table>