Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

Õâ¸öAJAXÄÄÀï´íÁËÄØ

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ÎÞ±êÌâÎĵµ </title>
</head>
<script language="JavaScript" type="text/JavaScript">
function Login(username,password)
{
var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP")
xmlHttp.open("POST", "2-1.asp?username="+username+"&password="+password,false)
xmlHttp.send()
var re=xmlHttp.responseText;
//alert(re);
//setTimeout("Login(sendvalue.username.value,sendvalue.password.value)",1000);
}
</script>
<body>
<form method=post name=sendvalue>
<input type=text name=username>
<input type=password name=password>
<input name="ok" type="button" value="/Ìá½»" onClick="Login(sendvalue.username.value,sendvalue.password.value)">
</form>
<div id="re"> </div>
</body>
</html>
2-1.aspÎļþÈçÏ£º
<%
response.Write request("username")
response.Write request("password")
%>
<script language="JavaScript" typ


Ïà¹ØÎÊ´ð£º

Asp.netÖÐʹÓÃajax·þÎñÆ÷¶Ë·µ»ØµÄÖµµÄÎÊÌâ

ǰ̨´úÂë:
HTML code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default4.aspx.cs" Inherits="Default4" %>
<!DOCTYPE html PUBLIC &qu ......

jQuery Ajax Ôõô»ñÈ¡ÁíÒ»Ò³ Response.WriteÊý¾Ý£¿

C# code:
<script type="text/javascript">

function get(aid){
$.ajax({
url:"t2.aspx?id="+aid+" & time="+new Date().toString(),
ty ......

ajaxÀïfileuploadÉÏ´«µÄÎÊÌâ






ÓÃasp.netµÄajaxʵÏÖµã»÷ͼһµÃµ¥Ñ¡°´Å¥¡°ÊÇ¡±£¬ÏÔʾͼ¶þµÄÒþ²Øpanel(panelÄÚ°üº¬ÉÏ´«¿Ø¼þ)
panelÒ³Ãæ¼ÓÔØʱÊÇÒþ²ØµÄ
µ«Êǵ±ÌύʱpanelµÄfileuploadÏÔʾûÓÐÎļþ
µ±ÎÒ°ÑpanelµÄvisiab ......

ajaxÒì²½¶ÁÊý¾ÝµÄÎÊÌâ

request.responseText¿ÉÒԵõ½·µ»ØµÄÒ³ÃæÊý¾Ý
µ«ÊÇÔÚ·þÎñÆ÷¶ËÉèÖõÄattribute£¬Ôڻص÷º¯ÊýÖУ¬Í¨¹ýrequest.getAttributeûÓа취µÃµ½

ÁíÍâ·¢ÏÖresponseText²»ÊDZê×¼µÄrequestµÄ·½·¨£¬Õâ¸öapiÔÚÄÄ¿ÉÒÔ²éµ½Ä ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ