if rs.eof then
   response.write"<SCRIPT language=JavaScript>alert('出错');"
   response.write"document.location='1.asp';</SCRIPT>"
   response.end
end if

解决方案 »

  1.   

    response.write"<script>window.location.href='1.asp';</script>"
      

  2.   

    直接用:
    Response.Redirect "1.asp"
    不是更好吗?何必写成
    Response.Write "<script language='javascript'>window.history.go(-1)</script>"
      

  3.   

    如果记录集为空,应该显示"没找到指定内容"字样呀。
    If Rs.Eof Then
    %>
      <table>
         ...没找到指定内容...
         <tr>
           <td>
              <a href="javascript:history.go(-1)">反回</a>
           </td>
         </tr>
      </table>
    <%
    End If