Re: [問題] about ASP的select問題
(前提請看上篇..目的希望運用select的nochange 去改變公告欄標題的分類並列出來)
我寫了一部份
想請問 option 的value要怎麼去對應到 我送給asp要處理的SQL1 或2 或3
= = = =
<HTML>
<body>
<div id="Layer1">
<form name="form1">
<select name="catalogue" onchange="ifra.location.search='xxx='+this.value">
<option value="SQL2">招生</option>
<option value="SQL3">一般事務</option>
<option value="SQL1">全部</option>
</select>
</form>
<%
SQL1 = "Select * From 公告 order by 發表日期 Desc"
SQL2 = "Select * From 公告 where 分類 = '招生' order by 發表日期 Desc"
SQL3 = "Select * From 公告 where 分類 = '一般事務' order by 發表日期 Desc"
SQL =??
Set rs = GetMdbRecordset("公告.mdb",SQL)
if rs.recordcount=0 then
response.write"目前沒有任何相關公告"
else
rs.movefirst
while not rs.eof
if rs("期限") <> "0" then
%>
<span>[<%=rs("發表日期")%>] </span>
<a href="/doc/dynamic/show.asp?no=<%=rs("識別碼")%> "><%= rs("
主題") %></a>
<br>
<%
end if
rs.movenext
Wend
end if
%>
</DIV>
<iframe name="ifra" width="100%"> <iframe>
</body>
</html>
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.117.157.18
討論串 (同標題文章)
Web_Design 近期熱門文章
PTT數位生活區 即時熱門文章
-3
16