超长字符的智能分页-支持HTML
来源:互联网 发布:php发邮件 编辑:程序博客网 时间:2024/04/30 13:25
Request Form Item
I_Forder = Request.Form ("I_Folder")
I_Topic = Request.Form ("I_Topic")
I_Title = htmlencode(Request.Form ("I_Title"))
I_Body = Request.Form ("body")
I_Source = Request.Form ("I_Source")
I_Keyword= htmlencode(Request.Form ("I_Keyword"))
I_ISHOT = request.form("ishot")
if i_ishot = "" then i_ishot="N"
i_ispic = request.form("ispic")
if i_ispic = "" then i_ispic ="N"
i_pic = request.form("InsertImage")
i_body = replace(i_body,"contentEditable=true","contentEditable=false")
Check Input
......
Get Pages ,B = Body
B_Len = Len(I_Body)
B_Pages = 1
T = Temp
T_Loop = true
Do While T_Loop 这里loop多次,每4000分一页,算出页码并加入库。
If B_Len > 4000 then
N_Body = Left(I_Body,4000) N = New
If "<P" in N_Body,Else ">" in N_Body
If Instrrev(N_Body,"<P") > 0 and (Len(N_Body) - Instrrev(N_Body,"<P"))< 400 then
N_Body = Left(N_Body,InstrRev(N_Body,"<P")-1)
else if Instrrev(N_Body," ") > 0 and (Len(N_Body) - Instrrev(N_Body," "))< 400 then
N_Body = Left(N_Body,InstrRev(N_Body," ")-1)
Else If Instrrev(N_Body,"。") > 0 and (Len(N_Body) - Instrrev(N_Body,"。"))< 400 then
N_Body = Left(N_Body,InstrRev(N_Body,"。"))
Else If Instrrev(N_Body,";") > 0 and (Len(N_Body) - Instrrev(N_Body,";"))< 400 then
N_Body = Left(N_Body,InstrRev(N_Body,";"))
else if Instrrev(N_Body,",") > 0 and (Len(N_Body) - Instrrev(N_Body,","))< 400 then
N_Body = Left(N_Body,InstrRev(N_Body,","))
else if Instrrev(N_Body,".") > 0 and (Len(N_Body) - Instrrev(N_Body,"."))< 400 then
N_Body = Left(N_Body,InstrRev(N_Body,"."))
end if
end if
End If
End If
end if
End if
N_Len = Len(N_Body)
I_Body = Mid(I_Body,N_Len+1)
B_Len = Len(I_Body)
Else
N_Body = I_Body
T_Loop = false
End If
Add to database
Exec_prc_Content_Ins I_Forder,I_Topic,I_Title,I_Source,N_Body,i_ispic,i_pic,i_ishot,I_Keyword,B_Pages
这里一个function,你可以自己处理,反正结果有两个,一个是body,一个是b_pages,就是页码。
B_Pages = B_Pages + 1
Loop
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
<link rel="stylesheet" type="text/css" href="../CSS/default.css">
</head>
<body>
<div align="center">
<center>
<table border=1 width="300" height="128" bordercolor="#000000" cellspacing="0" cellpadding="0" style="border-collapse: collapse"><tr>
<td bgcolor="#DEDBD6" height="31">
录入成功</td></tr><tr><td height="96">
<p align="center">此文章共分<%=B_Pages-1%>页
</td></tr></table>
</center>
</div>
<script>
top.main_top.location.reload();
</script>
</body>
I_Forder = Request.Form ("I_Folder")
I_Topic = Request.Form ("I_Topic")
I_Title = htmlencode(Request.Form ("I_Title"))
I_Body = Request.Form ("body")
I_Source = Request.Form ("I_Source")
I_Keyword= htmlencode(Request.Form ("I_Keyword"))
I_ISHOT = request.form("ishot")
if i_ishot = "" then i_ishot="N"
i_ispic = request.form("ispic")
if i_ispic = "" then i_ispic ="N"
i_pic = request.form("InsertImage")
i_body = replace(i_body,"contentEditable=true","contentEditable=false")
Check Input
......
Get Pages ,B = Body
B_Len = Len(I_Body)
B_Pages = 1
T = Temp
T_Loop = true
Do While T_Loop 这里loop多次,每4000分一页,算出页码并加入库。
If B_Len > 4000 then
N_Body = Left(I_Body,4000) N = New
If "<P" in N_Body,Else ">" in N_Body
If Instrrev(N_Body,"<P") > 0 and (Len(N_Body) - Instrrev(N_Body,"<P"))< 400 then
N_Body = Left(N_Body,InstrRev(N_Body,"<P")-1)
else if Instrrev(N_Body," ") > 0 and (Len(N_Body) - Instrrev(N_Body," "))< 400 then
N_Body = Left(N_Body,InstrRev(N_Body," ")-1)
Else If Instrrev(N_Body,"。") > 0 and (Len(N_Body) - Instrrev(N_Body,"。"))< 400 then
N_Body = Left(N_Body,InstrRev(N_Body,"。"))
Else If Instrrev(N_Body,";") > 0 and (Len(N_Body) - Instrrev(N_Body,";"))< 400 then
N_Body = Left(N_Body,InstrRev(N_Body,";"))
else if Instrrev(N_Body,",") > 0 and (Len(N_Body) - Instrrev(N_Body,","))< 400 then
N_Body = Left(N_Body,InstrRev(N_Body,","))
else if Instrrev(N_Body,".") > 0 and (Len(N_Body) - Instrrev(N_Body,"."))< 400 then
N_Body = Left(N_Body,InstrRev(N_Body,"."))
end if
end if
End If
End If
end if
End if
N_Len = Len(N_Body)
I_Body = Mid(I_Body,N_Len+1)
B_Len = Len(I_Body)
Else
N_Body = I_Body
T_Loop = false
End If
Add to database
Exec_prc_Content_Ins I_Forder,I_Topic,I_Title,I_Source,N_Body,i_ispic,i_pic,i_ishot,I_Keyword,B_Pages
这里一个function,你可以自己处理,反正结果有两个,一个是body,一个是b_pages,就是页码。
B_Pages = B_Pages + 1
Loop
%>
<html>
<head>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
<link rel="stylesheet" type="text/css" href="../CSS/default.css">
</head>
<body>
<div align="center">
<center>
<table border=1 width="300" height="128" bordercolor="#000000" cellspacing="0" cellpadding="0" style="border-collapse: collapse"><tr>
<td bgcolor="#DEDBD6" height="31">
录入成功</td></tr><tr><td height="96">
<p align="center">此文章共分<%=B_Pages-1%>页
</td></tr></table>
</center>
</div>
<script>
top.main_top.location.reload();
</script>
</body>
- 超长字符的智能分页-支持HTML
- 超长字符的智能分页-支持HTML
- 超长字符的智能分页-支持HTM
- 超长字符的分页显示
- php超长文本的分页
- 超长文本分页
- 超长字符串分页
- jsp实现新闻内容或超长文章的分页
- 电子书中超长字符串(章节内容)分页的算法
- 用JSPGen实现JSP字符串分页显示方法(支持超长字符串)
- 超长位数的字符数的加法与乘法
- 超长字符整数的相加(UCWEB 2010校园招聘笔试)
- 用CSS实现超长的字符变成省略号
- 用CSS实现超长的字符变成省略号 .
- 超长文章自动分页(含HTML),用ASP和Javascript实现
- 超长文章(HTML格式)自动分页,用ASP和JS实现
- 解决超长字符串分页问题
- 实现超长文本分页显示
- sql事务,在sql2000里判断执行是否成功用@@ERROR 判断
- 一个非常简洁的验证码程序
- 想找天使投资人吗?看看合格不
- 童言无忌最高境界~~笑死人
- Ajax体验1:Google浏览器之星Chrome冉冉升起
- 超长字符的智能分页-支持HTML
- 制作U盘启动盘(百度上的)
- 都是拍摄角度惹的祸
- 美登月宇航员太空服为何肮脏不堪
- 工作笔记-实现跨防火墙SQL Server数据库复制
- 目前网游收费方式收集和方向探讨
- VC支持的web2.0公司盈利状况分析
- 关于SQL分段查询
- DB2纯SQL存储过程入门实践