VBScript code:
Dim FoundErr,MsgErr
FoundErr = true
username=request.QueryString("userName")
password=request.QueryString("userPwd")
MsgErr = ""
if username = "" then
MsgErr = MsgErr & "Óû§ÃûΪ¿Õ"
End if
if password = "" ......
»Øµ÷º¯ÊýÈçÏ£º
function deleteCallBack(data)
{
if(data=="ɾ³ý³É¹¦")
{
alert(data);
location.reload();
}
else
{
alert(data);
}
}
²»Ìøת Ö»ÊÇÏÔʾalertÐÅÏ¢
ÊÔÊÔÏÂÃæµÄ·½·¨
JScript code:
1 history.go(0)
//2 location.reload()
3 location ......
C# code:
<script type="text/javascript">
window.onload=function()
{
startRequest('get','../College.ashx','lxyc=2&time='+new Date().getTime()+'',ShowIt,true);
}
var xmlHttp1;
function createXMLRequest()
{
if(window.ActiveXObject)
......
HuiFu.aspxÒ³Ãæ
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="HuiFu.aspx.cs" Inherits="fdfdcs" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transi ......
´ó¼ÒºÃ£¬Çë¸ßÊÖÃÇÖ¸µã
ÎÒµÄservletÎļþÊÇ£º
package com.ljc.rank.ajax;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
......
Õâ¸ö¹«Ë¾Ò²¸ÉÁ˺ó¤Ê±¼äÁË¡£×Ô´ÓʹÓÃAJAX¿ªÊ¼¾ÍÓõÄÊÇASP.NET AJAX°²×°°ü¡£ ʹÓõIJ»¶à£¬¶ÔÄÚºËÖÐXMLHttprRequestÈçºÎ´¦ÀíµÄÒ²²»ÖªµÀ¡£¶ÔÆäËû¹«Ë¾ÊÔÓõÄÇé¿öÒ²²»ÖªµÀ¡£Çë½Ìһϣ¬ÏÖÔÚ´ó¼Ò¶¼Ö»ÓÃʲô¿ª·¢AJAX¡£¶¼ÔÚʹÓõÚÈý·½µÄDLLÂð£¿
ÎÒÏÖÔÚÒª»»¹«Ë¾ÁË£¬´òËãÏÈ¿´¿´AJAXµÄ¶«Î÷£¬Ì«¶à¿ò¼ÜÁË¡£Ò²²»ÖªµÀ¿´ÄÄÒ»¸öÄÇ¡£ÏÖÔ ......