主题:  蓝鲸大哥请进来下。谢谢!

myclap

职务:普通成员
等级:1
金币:0.0
发贴:17
#12004/12/16 8:11:17
我自己给我们公司做了个网站,但是存在刷新的问题。就是说点着点着浏览器没有相应了。你看看这是这回事!急等回复!
网址是:[url=www.onset.com]www.onset.com[/url]
您看看!
这是存在问题页的代码:<!--#include file="conn.asp"-->
<%
dim sq,rs,maxPerPage
if request("myKeyword")<>"" then
sq="select * from hw where productname like "&quote("%"&request("myKeyword")&"%")&"and lei_2 like "&quote("%"&request("select1")&"%")&"order by hw_id desc"
else
sq="select * from hw order by hw_id desc"
end if
set rs=server.CreateObject("adodb.recordset")
rs.open sq,conn,1,1
MaxPerPage=5
page=Request("page")
if (page="" or isempty(page)) then page=1
rs.pagesize=MaxPerPage
%>
<HTML>
<HEAD>
<TITLE>昂思特科技发展有限责任公司</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<LINK
href="file:///C|/Documents%20and%20Settings/Administrator/&#26700;&#38754;/&#26114;&#26031;&#29305;/&#26114;&#26031;&#29305;&#31185;&#25216;&#21457;&#23637;&#26377;&#38480;&#36131;&#20219;&#20844;&#21496;01.files/css.css" type=text/css rel=stylesheet>
<script language=javascript>
<!--
function jumpTo(i){
if(i==1){
    this.document.location="xxcx.asp";}
if(i==2){
    this.document.location="xxcx.asp?page=<%=page-1%>";}
if(i==3){
    this.document.location="xxcx.asp?page=<%=page+1%>";}
if(i==4){
    this.document.location="xxcx.asp?page=<%=rs.pageCount%>";}
}
//-->
</script>
<script language=javascript src="../iadmin/nclude/opennew.js"--></script>
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<style type="text/css">
<!--
.style1 {color: #FF9900}
.style3 {color: #FF0000}
.style4 {
    font-size: 10pt;
    color: #000000;
    text-decoration: none;
}
.style5 {
    color: #FFFFFF;
    font-weight: bold;
}
.style6 {
    color: #FFFFFF;
    font-size: 12px;
}
-->
<!--
a:link {
    text-decoration: none;
}
-->
</style>
</HEAD>
<BODY leftMargin=0 background=file:///C|/Documents%20and%20Settings/Administrator/&#26700;&#38754;/&#26114;&#26031;&#29305;/&#26114;&#26031;&#29305;&#31185;&#25216;&#21457;&#23637;&#26377;&#38480;&#36131;&#20219;&#20844;&#21496;01.files/bg1.jpg topMargin=0>
<TABLE class=kuang cellSpacing=0 cellPadding=0 width=778 align=center
bgColor=#ffffff border=0>
<td width="778" bgcolor="#666666"><TBODY>
<TR>
<TD> <div align="left">
<script language="javascript" src="../js/top.js" type="text/javascript">
</script>
</div></TD></TR>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD width=168 height="778" vAlign=top bgColor=#f8f8f8>
<table width="168" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><script language="javascript" src="../js/left.js" type="text/javascript"></script></td>
</tr>
</table></TD>
<TD vAlign=top><table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td background="../images/ceng1.gif" bgcolor="#0066CC" >
<div align="center"> <font color="#FFFFFF" face="黑体">信息查询</font></span></div>
</div></td>
</tr>
</table>
<table width="100%" border="1" cellpadding="0" cellspacing="0" class="style4">
<tr>
<td height="150" valign="top" class="style6"><span class="style4"><img src="../images/ima/yellow.gif" width="7" height="11"></span>
页面注释:</td>
</tr>
</table>
<div align="center">
<form name="myform" method="post" action="xxcx.asp">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="style4">
<tr>
<td height="29" colspan="3"> <table width="93%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="11%" height="21" class="style4">产品类型:</td>
<td width="19%" class="style4"> <div align="left">
<select name="select1" id="select">
<option value="" selected>请选择类型</option>
<option value="笔记本电脑">笔记本电脑</option>
<option value="pc台式机">pc台式机</option>
<option value="数码产品">数码产品</option>
<option value="网络产品">网络产品</option>
<option value="办公设备">办公设备</option>
<option value="其他">其他</option>
</select>
</div></td>
<td width="11%" class="style4">产品名称:</td>
<td width="26%"><div align="left">
<input name="myKeyword" type="text" id="myKeyword" size="20">
</div></td>
<td width="33%"><input type="submit" name="Submit2" value="查询" onclick=check()></td>
</tr>
</table></td>
</tr>
</table>
<hr>
</form>
                 <script language="javascript">
<!--
function check()
{ if (document.myform.select1.value=="")
{
        window.alert("请选择类型!");
        document.myform.select1.focus();
        return false;
}

if (document.myform.myKeyword.value=="")
{
        window.alert("请输入查询内容!");
        document.myform.myKeyword.focus();
        return false;
}
    document.myform.submit();
}
//-->
</script>
</div>
                
        <%
        dim rsID
        i=1
        if not (rs.eof or err) then rs.move (page-1)*maxPerPage
        do while not (rs.eof or err)
%>
<table width="598" border="0" align="center" cellpadding="0" cellspacing="0" class="style4">
<tr valign="middle">
<td width="104" height="25" align="left"><div align="right"><strong><font color="#000000">信息主题:</font></strong></div></td>
<td width="494" height="25" align="left"><%=rs("hw_name")%></td>
</tr>
<tr valign="middle">
<td height="25" align="left"><div align="right"><strong><font color="#000000">信息类型</font>:</strong></div></td>
<td width="494" height="25" align="left"><%=rs("sort2_id")%></td>
</tr>
<tr valign="middle">
<td height="25" align="left"><div align="right"><strong><font color="#000000">产品名称:</font></strong></div></td>
<td width="494" height="25" align="left"><%=rs("productname")%></td>
</tr>
<tr valign="middle">
<td height="25" align="left"><div align="right"><strong><font color="#000000">产品类型:</font></strong></div></td>
<td width="494" height="25" align="left"><%=rs("lei_2")%></td>
</tr>
<tr valign="middle">
<td align="left"><div align="right"><strong><font color="#000000">发布人/单位:</font></strong></div></td>
<td width="494" align="left"><%=rs("zuoze")%></td>
</tr>
<tr>
<td height="13" colspan="2">-------------------------------------------------------------------------------------</td>
</tr>
</table>
                
<%
        i=i+1
        if i>maxPerPage then exit do
        rs.moveNext
        loop
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="style4">
<tr>
<td><div align="right"><%=rs.recordCount%> 项 第<%=page%>/<%=rs.pageCount%>
页 
<%if page>1 then%>
<input type="button" name="Submit3" value="首页" onClick="javascript:jumpTo(1)">
<input type="submit" name="Submit4" value="上页" onClick="javascript:jumpTo(2)">
<%else%>
<input type="button" name="Submit3" value="首页" disabled>
<input type="submit" name="Submit4" value="上页" disabled>
<%end if
if rs.recordCount>page*maxPerPage then%>
<input type="submit" name="Submit5" value="下页" onClick="javascript:jumpTo(3)">
<input type="submit" name="Submit6" value="末页" onClick="javascript:jumpTo(4)">
<%else%>
<input type="submit" name="Submit5" value="下页" disabled>
<input type="submit" name="Submit6" value="末页" disabled>
<%end if%>
</div></td>
</tr>
</table> </TD>
</TR>
</TABLE></TD></TR>
</TBODY></TABLE>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td bgcolor="#333333"><img src="../images/ccc.gif" width="1" height="1"></td>
</tr>
<tr>
<td height="18"><div align="center"><span class="style4">客服中心:(010)62554416 E-mail:onset-online@onset.cn</span></div></td>
</tr>
<tr>
<td height="18"><div align="center"><span class="style4">copyright&copy;2004 北京昂思特科技发展有限责任公司 </span></div></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
<%
rs.close
set rs=nothing
%>
</BODY></HTML>
请你给研究研究
看看什么地方出错了!
我的QQ是121166851。请您加上我!

编辑历史:[此帖最近一次被 蓝鲸 编辑过(编辑时间:2004-12-16 08:30:45)]


蓝鲸

职务:版主
等级:5
金币:42.1
发贴:2614
#22004/12/16 8:47:30
sql 语名应改为:
sq="select * from hw where productname like '%" & request("myKeyword") & "%'") &_
     " and lei_2 like '%" & request("select1") & "%' order by hw_id desc"
注意SQL中间的空格

CSS文件不能用绝对路径,就改为相对路径

按钮的TYPE属必应改为Button,就执行的是JS语句,而不是提交


非常大鱼