ASP+Ajax實(shí)現(xiàn)無(wú)刷新評(píng)論簡(jiǎn)單例子
來(lái)源:懂視網(wǎng)
責(zé)編:小采
時(shí)間:2020-11-27 22:52:36
ASP+Ajax實(shí)現(xiàn)無(wú)刷新評(píng)論簡(jiǎn)單例子
ASP+Ajax實(shí)現(xiàn)無(wú)刷新評(píng)論簡(jiǎn)單例子:<!--#include file=command.asp --> <% Dim CurPage CurPage=cint(Request(page)) If CurPage = empty or CurPage<1 Then CurPage = 1 End If Response.ContentType=application/xml Response.Charset=gb2312 Response.Expires=0 Respon
導(dǎo)讀ASP+Ajax實(shí)現(xiàn)無(wú)刷新評(píng)論簡(jiǎn)單例子:<!--#include file=command.asp --> <% Dim CurPage CurPage=cint(Request(page)) If CurPage = empty or CurPage<1 Then CurPage = 1 End If Response.ContentType=application/xml Response.Charset=gb2312 Response.Expires=0 Respon
<!--#include file="command.asp" -->
<%
Dim CurPage
CurPage=cint(Request("page"))
If CurPage = empty or CurPage<1 Then
CurPage = 1
End If
Response.ContentType="application/xml"
Response.Charset="gb2312"
Response.Expires=0
Response.Write("<?xml version=""1.0"" encoding=""gb2312""?>")
Dim rs,Sql '定義連接數(shù)據(jù)庫(kù)對(duì)象
Set rs=Server.CreateObject("ADODB.Recordset")
Sql="SELECT * From rev Order by id Desc"
rs.Open Sql,Conn,1,3
IF rs.Eof And rs.Bof Then
Response.Write("<data page=""0"" P_Nums=""0"">")
Response.Write("<Content>沒(méi)有留言</Content>")
Response.Write("</data>")
Response.End
Else
Dim PerPage,P_Nums,PageCountN,D_Nums
PerPage=3
Rs.PageSize=PerPage
Rs.AbsolutePage=CurPage
P_Nums=Rs.PageCount
D_Nums=Rs.RecordCount
Response.Write("<data page="""&CurPage&""" P_Nums="""&P_Nums&""" D_Nums="""&D_Nums&""">")
Do Until rs.EOF or PageCountN=PerPage
Response.Write("<Author PostTime="""&formatTime(rs("PostTime"))&"""><![CDATA["&rs("memContent")&"]]></Author>")
Response.Write("<Content><![CDATA["&rs("memContent")&"]]></Content>")
rs.MoveNext
PageCountN=PageCountN+1
Loop
End If
Response.Write("</data>")
%>
打包文件下載
聲明:本網(wǎng)頁(yè)內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問(wèn)題請(qǐng)及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com
ASP+Ajax實(shí)現(xiàn)無(wú)刷新評(píng)論簡(jiǎn)單例子
ASP+Ajax實(shí)現(xiàn)無(wú)刷新評(píng)論簡(jiǎn)單例子:<!--#include file=command.asp --> <% Dim CurPage CurPage=cint(Request(page)) If CurPage = empty or CurPage<1 Then CurPage = 1 End If Response.ContentType=application/xml Response.Charset=gb2312 Response.Expires=0 Respon