asp.netÀûÓÃjqueryµÄajax·½·¨À´ÑéÖ¤µÇ½µÄ´úÂë
Ðí¶à³ÌÐòÔ±ÔÚ×öÒµÎñ¿ª·¢Ê±ÍùÍù»áÔÚ·þÎñÆ÷¶Ë×öÓû§ÐÅÏ¢µÄÑéÖ¤£¬ÓÐûÓп¼ÂǹýÓÃjqueryµÄajax·½·¨À´ÑéÖ¤µÇÂ½ÄØ£¿ÇÒЧ¹û±ÈÔÚ·þÎñÆ÷¶Ëд´úÂëÀ´ÑéÖ¤ºÃµÄ¶à£¬Ò³ÃæÎÞˢм´¿ÉʵÏÖʵÏֵǽÑéÖ¤£¬´úÂëÒ²¼òµ¥¡£
ÏÖÔÚÏÂÃæÌù³öÀ´µÄÊǺܼòµ¥µÄÓÃjqueryµÄajax·½·¨À´ÑéÖ¤µÇ½µÄ´úÂ룬ÊʺϸսӴ¥jqueryµÄÅóÓÑѧϰ¡£
Ç°Ì¨Ò³Ãæ´úÂ룺
<head>
<script src="js/jquery-1.3.2.min.js"></script>
<script type="text/javascript">
userlogin=function(){
$.ajax({
type:"get",
cache:false,
url:"ajaxpage.aspx",
dataType:"json",
data:"username="+$("#txt_username").val()+"&password="+$("#txt_pwd").val(),
success:function(data){
if(data.sta==1)
{
alert(data.info);
}
else
{
alert(data.info);
}
}
})
}
</script>
</head>
<body>
<div>
<table>
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Óû§Ãû£º"></asp:Labe
Ïà¹ØÎĵµ£º
XMLHttpRequestÊÇAjax¼¼ÊõÌåϵÖÐ×îΪºËÐĵļ¼Êõ¡£È±ÉÙÁËËü£¬AjaxµÄÆäÓ༼Êõ¾ÍÎÞ·¨³ÉΪһ¸öÓлúµÄÕûÌ壬½«»áÍÁ±ÀÍ߽⡣
¡¡¡¡1999ÄêÉϰëÄ꣬MSÔÚIE 5.0°æÖÐÊ×´ÎÖ§³ÖÕâÖÖ¼¼Êõ£¬ËûÃÇÊÇͨ¹ýÒ»¸öÃûΪXMLHTTPµÄActiveX¶ÔÏóÀ´Ö§³ÖÕâÖÖ¼¼ÊõµÄ¡£XMLHTTP¶ÔÏóʹµÃÒ³ÃæÖеĽű¾¾ßÓÐÁËÔÚ²»Ë¢ÐÂÒ³ÃæµÄÇé¿öÏÂÖ±½ÓÓë·þÎñÆ÷ͨÐŵÄÄÜÁ¦¡£ÔÚ´ËÖ ......
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
namespace jiu ......
ÆäʵËùνµÄα¾²Ì¬Ò³Ãæ,¾ÍÊÇÖ¸µÄURLÖØÐ´.
1.Ê×ÏÈÔÚweb.configÀïд
<configSections>
<section name="RewriterConfig" type="URLRewriter.Config.RewriterConfigSerializerSectionHandler, URLRewriter"/>
</configSections>
2.ÔÚweb.configÀïÌí¼ÓÒÔϽڵã
<httpHandlers>
< ......
½â¾ö°ì·¨£ºapp_code/ ´æ·ÅÒ»¸öÀà ÓÃÀ´½Ø»ñHTTP
1.´úÂëÈçÏÂ
using System;
using System.IO;
using System.Web;
using System.Text;
using System.Text.RegularExpressions;
/// <summary>
/// Removes whitespace from the webpage.
/// </summary>
public class ViewstateModule : IHttpModule
{
......
ASP.NET´ò¿ªÐÂÒ³Ãæ¶ø²»¹Ø±ÕÔÀ´µÄÒ³Ãæ
Respose.Write("<script language='javascript'>window.open('"+ url +"');</script>"); £¨´ò¿ª¼ò½à´°¿Ú£©£º
Respose.Write("<script l ......