<!--#include file="conn.asp"--> <script> function openshenj(id) {
window.open("shenji_2.asp?news_id="+id,"","width='100%',height='400',left=0,top=0,resizable=yes,s
crollbars=yes,toolbar=yes,menubar=yes,location=yes");} </script>
<% Keyword=Request("Keyword") stype=Request("type") if stype<>"all" then set rs=server.createobject("adodb.recordset") sql="select * from shenji where newsclass_id ='"&stype&"' and news_title like '%"&keyword&"%'" %> <% rs.open sql,conn,3,3 news_id=rs("news_id") do while not rs.eof %> <a href='javascript:openshenj(<%=rs("news_id")%>)'><%=rs("news_title")%></a> <%rs.movenext loop rs.close
%> <%else%> <% set rs=server.createobject("adodb.recordset") sql="select * from shenji where news_title like '%"&keyword&"%'" ''''''UNION ALL select * from shenji where news_title like '%"&keyword&"%' %> <% rs.open sql,conn,3,3 news_id=rs("news_id") do while not rs.eof %> <a href='javascript:openshenj(<%=rs("news_id")%>)'><%=rs("news_title")%></a> <%rs.movenext loop rs.close set rs=nothing %> <%end if%>
查询显示的时候能显示内容,但说网页有错误,点开连接页shenji_2.asp也点不开,不知何古。
请指教。!!