?? productsearchform.asp
字號(hào):
<%
'=================================================
'過(guò)程名:ShowProductTypeList
'作 用:用下拉列表框顯示手機(jī)廠(chǎng)商
'參 數(shù):nTypeId:廠(chǎng)商編號(hào)
'=================================================
sub ShowProductTypeList(nTypeId)
%>
<SELECT name = "ProductType" style = "background-color: rgb(210,232,255); font-size:9pt" ID = "Select1">
<option value = "0">全部廠(chǎng)商</option>
<%call ProductTypeToSelect(nTypeId)%>
</SELECT>
<%
end sub
'=================================================
'過(guò)程名:ProductTypeToSelect
'作 用:將手機(jī)廠(chǎng)商添加到下拉列表框中(無(wú)修飾)
'參 數(shù):nTypeId:廠(chǎng)商編號(hào)
'=================================================
sub ProductTypeToSelect(nTypeId)
dim strSQL, rsObj
dim tempi
dim nID, szName
if Not IsNumeric(nTypeId) then
nTypeId = 0
end if
strSQL = "SELECT * FROM ProductType WHERE SuperID = 0"
set rsObj = conn.execute (strSQL)
if (rsObj.eof or err) then
Response.Write "ERr!"
exit sub
else
do while not rsObj.eof
nID = rsObj("id")
szName = rsObj("name")
Response.Write "<option value = "&nID
if CLng(nID) = CLng(nTypeId) then Response.Write " selected"
Response.Write ">"
Response.Write szName&"</option>"
rsObj.MoveNext
loop
end if
end sub
%>
<%
'=================================================
'過(guò)程名:ShowSearchForm
'作 用:顯示查找表單
'參 數(shù):
' myKeyword:在搜索產(chǎn)品文本框中顯示的內(nèi)容
' nTypeId:廠(chǎng)商編號(hào)
'=================================================
sub ShowSearchForm(myKeyword, nTypeId)
%>
<table width = "100%" border = "0" cellspacing = "0" cellpadding = "4" align = "center" height = "30" ID = "Table7">
<tr>
<form method = "post" name = "orderSearch" action = "orderSearch.asp" ID = "Form1">
<td width = "45%" valign = "top"> 訂單號(hào)
<input type = "text" size = "12" name = "orderID" onKeyUp = "checknum(orderSearch.orderID)" style = "font-size: 9pt; border: 1px solid #7D85A2; background-color: rgb(210,232,255)" ID = "Text1">
<input type = "submit" name = "Submit3" value = "訂單搜索" class = "forInput" style = "font-size: 9pt; border: 1px solid #7D85A2; background-color: rgb(210,232,255)" ID = "Submit1">
</td>
</form>
<form name = "productSearch" method = "post" action = "product.asp" ID = "Form2">
<td width = "55%" valign = "top">
<input type = "text" name = "Keyword" size = "12" value = "<%=myKeyword%>" style = "font-size: 9pt; border: 1px solid #7D85A2; background-color: rgb(210,232,255)" ID = "Text2">
<% call ShowProductTypeList(nTypeId) %>
<input type = "submit" name = "Submit4" value = "產(chǎn)品搜索" class = "forInput" style = "font-size: 9pt; border: 1px solid #7D85A2; background-color: rgb(210,232,255)" ID = "Submit2">
</td>
</form>
</tr>
</table>
<%
end sub
%>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -