<!--#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") mtype=Request("mtype") if mtype<>"all" then set rs=server.createobject("adodb.recordset") sql="select * from shenji where newsclass_id ='"&mtype&"' 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%>
查询框的代码是:
<form name="search" method="post" action="search.asp"> <input name="keyword" type="text" class="input" size="21"> <select name="mtype" id="mtype" size="1" style="font-size:12px" class="input"> <option value="all"selected="selected">------全部--------</option> <option value="1">审计简报</option> <option value="4">通知通告</option> <option value="5">论文研讨</option> </select>
其中的JS脚本是没有错误的,该查询页也能正常显示,但就就在状态拦上报:网页上有错误。
请大家帮忙看看。
错误主要就是集中在红色区域。