ASP长文章内容自动分页函数
<%
Const maxPagesize=1000 '设置分页字数
Function InsertPageBreak(strText)
Dim strPagebreak,s,ss
Dim i,IsCount,c,iCount,strTemp,Temp_String,Temp_Array
strPagebreak="[hiweb_break]"
s=strText
If Len(s)<maxPagesize Then
InsertPageBreak=s
End If
s=Replace(s, strPagebreak, "")
s=Replace(s, " ", "< >")
s=Replace(s, ">", "<>>")
s=Replace(s, "<", "<<>")
s=Replace(s, """, "<">")
s=Replace(s, "'", "<'>")
If s<>"" and maxPagesize<>0 and InStr(1,s,strPagebreak)=0 then
IsCount=True
Temp_String=""
For i= 1 To Len(s)
c=Mid(s,i,1)
If c="<" Then
IsCount=False
ElseIf c=">" Then
IsCount=True
Else
If IsCount=True Then
If Abs(Asc(c))>255 Then
iCount=iCount+2
Else
iCount=iCount+1
End If
If iCount>=maxPagesize And i<Len(s) Then
strTemp=Left(s,i)
If CheckPagination(strTemp,"table|a|b>|i>|strong|div|span") then
Temp_String=Temp_String & Trim(CStr(i)) & ","
iCount=0
End If
End If
End If
End If
Next
If Len(Temp_String)>1 Then Temp_String=Left(Temp_String,Len(Temp_String)-1)
Temp_Array=Split(Temp_String,",")
For i = UBound(Temp_Array) To LBound(Temp_Array) S
相关文档:
<%
Const New_img=10
set rs_Product=server.createobject("adodb.recordset")
sqltext="select top " & New_img & " * from 0791idc_Product order by ID"
rs_Product.open sqltext,conn,1,1
if not rs_Product.EOF then%>
<div align='center' id='demo' style='o ......
Adodb.Stream是ADO的Stream对象,提供存取二进制数据或者文本流,从而实现对流的读、写和管理等操作.
有下列方法:
Cancel 方法
使用方法如下
Object.Cancel
说明:取消执行挂起的异步 Execute 或 Open 方法的调用。
Close 方法
......
'SQL防注入函数,调用方法,在需要防注入的地方替换以前的request("XXXX")为SafeRequest("XXXX")
'www.yongfa365.com
Function
SafeRequest(ParaValue)
ParaValue =
Trim
(
Request
(Pa ......
这几天学习动态网站的制作:ASP。由于老师讲的很认真,很详细,课程能听懂,自己也买了一本关于ASP的书籍,ASP的一些功能的实现,怎么做出来能看的差不多,可就是做的时候好差劲,不是某个英语单词不会写,就是重复错误出现,深刻的明白,做网站原来这么难,不仅需要严谨的逻辑思维能力,而 ......