一个AJAX局部刷新的例子

终于睛天了.

一个AJAX局部刷新的例子:

前台页面:

 

<% @LANGUAGE = " VBSCRIPT "  CODEPAGE = " 65001 " %>
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
< html  xmlns ="http://www.w3.org/1999/xhtml" >
< head >
< meta  http-equiv ="Content-Type"  content ="text/html; charset=utf-8"   />
< title > AJAX局部刷新 title >
< script  type ="text/javascript" >

script >
head >

< body >
< div  id ="partdiv" > div >
body >
html >

 

后台页面:[getPart.asp]

 

<% @LANGUAGE = " VBSCRIPT "  CODEPAGE = " 65001 " %>

<%
    
dim  rs
    
dim  sql

    
    
Set  rs  =  Server.CreateObject( " ADODB.Recordset " )
    sql 
=   " select * from king_test "
    rs.open sql,conn,
1 , 1
    
if   not  (rs.bof  and  rs.eof)  then
    Response.Write(
" ")
    Response.Write(escape(
""))
    
do while not rs.eof
%>
<tr><td><%Response.Write(rs("id"))%> td >< td > <% Response.Write(escape(rs( " keyword " ))) %> td > tr >
<%
    rs.movenext
    
loop
    Response.Write(
"
ID关键字
" )
    
end   if
    rs.close
    
set  rs  =   nothing
    conn.close
    
Set  conn  =   nothing
%>

你可能感兴趣的:(JAVASCRIPT,ASP)