asp生成静态页面的问题,谢谢
我有个生成html静态的页面源码,一口气生成所有,如果内容多,就会卡死我想改成一批生成10个,3秒后生成下一批主要代码如下:<%totalrec=Conn.Execute...
我有个生成html静态的页面源码,
一口气生成所有,如果内容多,就会卡死
我想改成一批生成10个,3秒后生成下一批
主要代码如下:
<%
totalrec=Conn.Execute("select count(*) from niu_News")(0)
sql="Select * from niu_News order by ID desc"
Set Rs=Conn.Execute(sql)
if totalrec=0 then
Detail_Num=0
Else
Detail_Num=1
do while not rs.eof
ID=rs("ID")
sortid=rs("sortid")
call htmll("","","game/"&ID&"."&HTMLName&"","template_newsview.asp","ID=",ID,"sortid=",sortid&"&menuclass=xinwen")
Response.Write "<script>bar_img.width="&Fix((Detail_Num/totalrec)*300)&";"
Response.Write "bar_txt1.innerHTML=""已成功生成静态页"&Detail_Num&"页,完成比例:" & formatnumber(Detail_Num/totalrec*100) & """;</script>"
Response.Flush
rs.movenext
Detail_Num=Detail_Num+1
loop
end if
rs.close
set rs=Nothing
conn.close
set conn=Nothing
%> 展开
一口气生成所有,如果内容多,就会卡死
我想改成一批生成10个,3秒后生成下一批
主要代码如下:
<%
totalrec=Conn.Execute("select count(*) from niu_News")(0)
sql="Select * from niu_News order by ID desc"
Set Rs=Conn.Execute(sql)
if totalrec=0 then
Detail_Num=0
Else
Detail_Num=1
do while not rs.eof
ID=rs("ID")
sortid=rs("sortid")
call htmll("","","game/"&ID&"."&HTMLName&"","template_newsview.asp","ID=",ID,"sortid=",sortid&"&menuclass=xinwen")
Response.Write "<script>bar_img.width="&Fix((Detail_Num/totalrec)*300)&";"
Response.Write "bar_txt1.innerHTML=""已成功生成静态页"&Detail_Num&"页,完成比例:" & formatnumber(Detail_Num/totalrec*100) & """;</script>"
Response.Flush
rs.movenext
Detail_Num=Detail_Num+1
loop
end if
rs.close
set rs=Nothing
conn.close
set conn=Nothing
%> 展开
2个回答
展开全部
这是index.asp的代码。
<html>
<%call head()%>
<table width="1004" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><% call top()%></td>
</tr>
</table>
<table width="1004" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="6" height="115"></td>
<td width="230" valign="top">
<table width="230" border="0" cellspacing="0" cellpadding="0">
<tr>
<html>
<%call head()%>
<table width="1004" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><% call top()%></td>
</tr>
</table>
<table width="1004" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="6" height="115"></td>
<td width="230" valign="top">
<table width="230" border="0" cellspacing="0" cellpadding="0">
<tr>
Storm代理
2023-08-29 广告
2023-08-29 广告
"StormProxies是全球大数据IP资源服务商,其住宅代理网络由真实的家庭住宅IP组成,可为企业或个人提供满足各种场景的代理产品。点击免费测试(注册即送1G流量)StormProxies有哪些优势?1、IP+端口提取形式,不限带宽,I...
点击进入详情页
本回答由Storm代理提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询