ASP批量生成静态页面的写法(批量生成技巧iframe)

来源:asp之家 时间:2011-02-24 11:01:00 

代码如下:


<!-- #include file="../conn.asp" -->
<!-- #include file="../cls_main.asp" -->
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>生成百度XML</title>
</head>
<body>
<%
dim sid,eid
sid=abs(request("sid"))
if sid=0 then
sid=0
else
sid=cint(request("sid"))
end if
eid=cint(request("eid"))
if eid=0 then
eid=500
else
eid=cint(request("eid"))
end if
Dim tt,ResNum
Set tt = New Cls_Main
ResNum = CLng(tt.Execute("select max(id) from table")(0))
Set Mesky = Nothing
%>

<table border="0" width="100%" id="table1" cellspacing="0" cellpadding="0">
<form method="POST" action="?action=html">
<tr>
<td width="9%">开始ID:</td>
<td width="35%"><input type="text" name="sid" size="20" value="<%=sid%>"></td>
<td width="8%">结束ID:</td>
<td width="23%"><input type="text" name="eid" size="20" value="<%=eid%>">(最大ID:<%=ResNum%>)</td>
<td width="23%"><input type="submit" value="提交" name="B1"></td>
</tr>
</form>
<%
if request("action")="html" then
Response.Write " <tr><td colspan=5>" & vbNewLine
Response.Write "<br><br>" & vbNewLine
Response.Write "正在生成 <font color='red'><b>" & eid & ".xml</b></font> 文件…… " & vbNewLine
Response.Write "<br><br>" & vbNewLine
Response.Write "  </td></tr><tr><td colspan=5>" & vbNewLine
Response.Flush

If (eid-500) > ResNum Then
Response.Write "恭喜您操作成功!"
Response.Flush
else
creat(sid)
sid=sid+500
eid=eid+500
Response.Write "<meta http-equiv=""refresh"" content=""10;url=?action=html&sid="&sid&"&eid="&eid&""">"
End If
end if

Function creat(id)
Response.Write "<IFRame name=tt frameborder=0 width=100% height=30 scrolling=no src=http://www.xx.com/cls_create.asp?startid="&sid&"&endid="&eid&"></IFrame>"
End Function
%>
</td></tr>
</table>
</body>
</html>

标签:批量,生成静态
0
投稿

猜你喜欢

  • 设计72变——寻求banner制作的变化

    2009-11-12 12:56:00
  • 字符,字节和编码

    2009-12-09 15:59:00
  • 记Qzone项目组视觉设计标注的前前后后

    2010-03-24 18:03:00
  • 掀起抛弃IE6的高潮吧

    2009-02-26 12:44:00
  • 查找备注(text,ntext)类型字段为空的方法

    2008-08-02 12:47:00
  • ASP检测服务器相关的一些代码

    2008-01-25 19:20:00
  • 浅谈图表参数化设计

    2010-08-29 18:03:00
  • 怎么样才能让层显示在FLASH之上呢

    2008-03-05 13:32:00
  • asp访google分页代码

    2009-07-10 13:06:00
  • JavaScript缓动库

    2009-05-25 12:50:00
  • 新手教程:如何设置五大类MySQL参数

    2010-03-03 16:40:00
  • javaScript通用数据类型校验函数

    2009-07-06 12:49:00
  • CSS鼠标悬停tip效果

    2007-08-26 17:32:00
  • 如何在ADO中使用SQL函数?

    2010-06-17 12:51:00
  • 如何解决ASP脚本运行超时的错误

    2007-10-14 11:38:00
  • 教你在MySQL 5.0以上版本中配置主从库

    2009-01-04 13:17:00
  • CSS背景图片的运用优化HTTP连接数

    2008-09-04 21:38:00
  • 根据表名和索引获取需要的列名的存储过程

    2011-09-30 11:54:42
  • “生活”设计

    2009-03-03 12:14:00
  • js和asp操作fso比较

    2007-09-23 09:17:00
  • asp之家 网络编程 m.aspxhome.com