?? query.asp
字號:
<%
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from ANclass order by Nclassid asc"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= trim(rs("classid"))%>","<%= trim(rs("Nclassid"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.Nclassid.length = 1;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
<form method="post" name="myform" action="ru_query.asp">
<div align="center">
<select name="action" size="1" class="smallinput" >
<option value="title">產品名稱..</option>
<option value="content">產品描述..</option>
<option value="price">產品價格..</option>
</select>
<br>
<select name="classid" class="smallinput" onChange="changelocation(document.myform.classid.options[document.myform.classid.selectedIndex].value)" size="1">
<option selected value="">未指定條件</option>
<%
sql = "select * from Aclass"
rs.open sql,conn,1,1
do while not rs.eof
%>
<option value="<%=trim(rs("classid"))%>"><%=trim(rs("class"))%></option>
<%
rs.movenext
loop
rs.close
%>
</select>
<br>
<select name="Nclassid" class="smallinput" >
<option selected value="" >未指定條件</option>
</select>
<br>
<input type="text" name="keyword" class="smallinput" size=10 value="關鍵字" maxlength="50">
<br>
<input type="submit" name="Submit" class="buttonface" value="產品查詢">
</div>
</form>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -