asp页面打开超慢
程序代码:
<!--#include file="..\yytj\conn.asp"--> <%set rs1=server.createobject("adodb.recordset") sql1="SELECT * FROM dyyjcsj" rs1.open sql1,conn,1,3 %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>无标题文档</title> <script type="text/javascript"> function $(id){ return document.getElementById?document.getElementById(id):document.all[id]; } function changeValue() { var total=0; var num=0; if($('nian').value!=''&&$('yue').value!=''&&$('ri').value!=''&&$('a1').value!=''&&$('a2').value!=''&&$('a3').value!=''&&$('a4').value!=''&&$('yymc_dm').value!='') { $('nian').value=parseFloat($('a1').value)*10000000; total += parseFloat($('a1').value)*10000000; num += parseFloat($('a1').value); } { $('yue').value=parseFloat($('a2').value)*100000; total += parseFloat($('a2').value)*100000; num += parseFloat($('a2').value); } { $('ri').value=parseFloat($('a3').value)*1000; total += parseFloat($('a3').value)*1000; num += parseFloat($('a3').value); } { $('yymc_dm').value=parseFloat($('a1').value)*10000000+parseFloat($('a2').value)*100000+parseFloat($('a3').value)*1000+parseFloat($('a4').value); total += parseFloat($('a1').value)*10000000+parseFloat($('a2').value)*100000+parseFloat($('a3').value)*1000+parseFloat($('a4').value); num += parseFloat($('a3').value); } } </script> <script> var ie =navigator.appName=="Microsoft Internet Explorer"?true:false; function $(objID){ return document.getElementById(objID); } </script> <style type="text/css"> <!-- #tm { font-weight: bold; } .tm { font-size: 18px; } #tm { font-size: 24px; } body table { font-weight: bold; text-align: center; font-size: 12px; } #gsyybm { height: 25px; width: 110px; font-size: 12px; line-height: 25px; text-align: center; } #yymc { height: 25px; width: 350px; font-size: 12px; line-height: 24px; } #bz { height: 40px; width: 850px; } #htb { text-align: center; height: 25px; width: 160px; } body table form tr td { font-size: 12px; font-weight: normal; text-align: center; color: #000; } #zi { color: #03C; } --> </style> </head> <body bgcolor="#0066FF" onload="setup()"> <table width="100%" border="0" align="center" cellspacing="1" bgcolor="#CCCCCC" > <tr> <td height="30" colspan="9" align="left" bordercolor="#CCCCCC" bgcolor="#FFFFFF"><form name="form2" method="post" action="pfhj4.asp"> <label for="yymc"></label> <select name="yymc" > <option value="" >影院名称</option> <% set rs=server.createobject("adodb.recordset") sql="SELECT * FROM dyyjcsj order by yymc asc " rs.open sql,conn,1,3 do while not rs.eof %> <option value="<%=rs("yymc")%>"><%=rs("yymc")%></option> <% rs.movenext loop %> </select> <label for="pm"></label> <select name="pm" > <option value="" >影片名称</option> <% set rs1=server.createobject("adodb.recordset") sql1="SELECT * FROM jh order by pm asc " rs1.open sql1,conn,1,3 do while not rs1.eof %> <option value="<%=rs1("jh_id")%>"><%=rs1("pm")%></option> <% rs1.movenext loop %> </select> <label for="yue"></label> <select name="yue" id="yue"> <option value="" >月份</option> <%for t =1 to 12%> <option value="<%=t%>"><%=t%></option> <%next%> </select> <input type="submit" name="button" id="button" value="提交"> </form></td> </tr> <tr> <td height="30" colspan="9" bordercolor="#CCCCCC" bgcolor="#FFFFFF" class="tm">数字影院放映成就结算表</td> </tr> <tr> <td colspan="3" align="left" bordercolor="#CCCCCC" bgcolor="#FFFFFF">单位名称:北京红鲤鱼数字电影院线有限公司</td> <td bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td> <td bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td> <td bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td> <td colspan="2" bordercolor="#CCCCCC" bgcolor="#FFFFFF">制表时间:<%=date()%></td> <td bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td> </tr> <form name="form1" method="post" action=""> <tr> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><strong>序号</strong></td> <td width="150" height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><strong>影院名称</strong></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><strong>影院票房收入</strong></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><strong>公司票房收入</strong></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><strong>专项服务费</strong></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><strong>其他收入</strong></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><strong>中影公司</strong></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td> </tr> <% yymc=request.Form("yymc") yue=request.Form("yue") pm=request.Form("pm") set rs4=server.createobject("adodb.recordset") sql4="SELECT yymc,xycw.je,SUM(rb.yue)as qq,SUM(pf)as pf FROM dyyjcsj,rb,jh,xycw where dyyjcsj.xuhao=rb.xuhao and rb.xuhao in ( select xuhao from xycw where xuhao=dyyjcsj.xuhao and fklb='佣金' order by je asc) and rb.pm=jh.jh_id and rb.yue ="&month(date()) if yymc<>"" then sql4=sql4&" and dyyjcsj.yymc = '"&yymc&"' " end if if yue<>"" then sql4=sql4&" and rb.yue = "&yue end if if pm<>"" then sql4=sql4&" and rb.pm = "&pm end if sql4=sql4&" GROUP BY yymc,xycw.je order by dyyjcsj.yymc asc " response.Write(sql4) rs4.open sql4,conn,1,3 %> <% w=0 s=0 do while not rs4.eof w=w+1 s=s+rs4("pf") %> <tr> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><%=w%></td> <td width="150" height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><%=rs4("yymc")%></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><%=rs4("pf")%></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><%=(rs4("pf")-rs4("pf")*0.05-rs4("pf")*0.033)*0.5%></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><%=rs4("xycw.je")%></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><%=(rs4("pf")-rs4("pf")*0.05-rs4("pf")*0.033)*0.45%></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td> </tr> <% rs4.movenext loop %> <tr> <td height="20" colspan="2" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><strong>合计</strong></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><%=s%></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><%=(s-s*0.05-s*0.033)*0.5%></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><%=xycw.je%></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"><%=(s-s*0.05-s*0.033)*0.45%></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"></td> <td height="20" align="center" nowrap bordercolor="#CCCCCC" bgcolor="#FFFFFF"> </td> </tr> </form> </table> </body> </html>这个是我的源码,新手- - 就这一个页面打开得花一分钟,有时候还提示连接超时。 没连js 也没图片什么的,就是调去access里面的数据,数据也不多 就1000左右。好像是sql4的毛病,大家帮我看下,能不能优化额。- -