JQueryµÄajaxʵÀý
<html>
<head>
<title>jQuery Ajax ʵÀýÑÝʾ</title>
</head>
<script language="javascript" src="../lib/jquery.js"></script>
<script language="javascript">
$(document).ready(function ()
{
$('#send_ajax').click(function (){
var params=$('input').serialize(); //ÐòÁл¯±íµ¥µÄÖµ
$.ajax({
url:'ajax_json.php', //ºǫ́´¦Àí³ÌÐò
type:'post', //Êý¾Ý·¢ËÍ·½Ê½
dataType:'json', //½ÓÊÜÊý¾Ý¸ñʽ
data:params, //Òª´«µÝµÄÊý¾Ý
success:update_page //»Ø´«º¯Êý(ÕâÀïÊǺ¯ÊýÃû)
});
});
//$.post()·½Ê½£º
$('#test_post').click(function (){
$.post(
'ajax_json.php',
{
username:$('#input1').val(),
age:$('#input2').val(),
sex:$('#input3').val(),
job:$('#input4').val()
},
function (data) //»Ø´«º¯Êý
{
var myjson='';
eval('myjson=' + data + ';');
$('#result').html("ÐÕÃû:" + myjson.username + "<br/>¹¤×÷:" + myjson['job']);
}
);
});
//$.get()·½Ê½£º
$('#test_get').click(function ()
{
$.get(
'ajax_json.php',
&nb
Ïà¹ØÎĵµ£º
½ñÌìÐèҪдһ¸ö¹¦ÄÜ£¬¶ÔÓÚÊý¾Ý¿âÖеÄÊý¾Ý£¬ÔÚÓû§Í¨¹ýWEBÏÔʾ³öÀ´µÄʱºò£¬×Ô¶¯Æô¶¯·þÎñÆ÷¶Ë½Å±¾¶Ôÿ¸öÊý¾ÝµÄÓÐЧÐÔ½øÐмì²â£¬²¢½«½á¹û³ÊÏÖ¸øÓû§¡£
ÎÒ¿¼ÂǵľÍÊÇ£¬³ÊÏÖÿÌõÊý¾ÝµÄʱºò£¬Æô¶¯Ò»¸öajaxͨÐŽø³Ì£¬½«½á¹û·´À¡»ØÀ´¾ÍOKÁË¡£
ϸ½Ú·½ÃæÐèÒª¿¼ÂǵÄÊÇ£¬Ã¿¸ö½ø³ÌÍê³ÉÈÎÎñºóÔڻص÷µÄʱºòÈçºÎÖªµÀËüµÄ“ËÞÖ÷&rdquo ......
asp.net ajaxÖÐÎÄÂÒÂëµÄ½â¾ö£¿
2010-01-19 12:06
ÒÔǰûÔõô×ÐϸµÄÑо¿¹ýajax,Ö»ÊÇÓõ½Á˾ÍÖ±½ÓÄùýÀ´ÓÃ,·¢ÏÖÁËÎÊÌâÔÙÕÒ½â¾ö·½·¨.ÒÔÏÂÊÇÎÒÔÚÕÒ½â¾öÎÊÌâµÄ¹ý³ÌÖеÄÒ»µãССµÄ×ܽá.
Ò».̸AjaxµÄGetºÍPostµÄÇø±ð
Get·½Ê½:
ÓÃget·½Ê½¿É´«Ëͼòµ¥Êý¾Ý£¬µ«´óСһ°ãÏÞÖÆÔÚ1KBÏ£¬Êý¾Ý×·¼Óµ½urlÖз¢Ë ......
11) ±íµ¥×ֶΰïÖúÐÅÏ¢µÄ×Ô¶¯Ìáʾ
ÔöÇ¿WEB±íµ¥µÄUsabilityÓкܶàºÜ¶àµÄ·½·¨£¬ÔÚÍøÉÏÒ»ËÑÒ»´óƬ£¬È»ºóÓÐЩʱºò£¬Óû§»á±»±íµ¥¸ãµÃºÜ»ìÂÒ£¬¶øÇÒ£¬²»Í¬µÄÓû§»á¶Ô±íµ¥Óв»Í¬µÄÀí½â£¬ÆäÊäÈëÒ²ÊÇǧÆæ°Ù¹Ö¡£ËùÒÔ£¬Îª±íµ¥×Ö¶ÎÔö¼ÓÒ»ÏÂ×Ô¶¯°ïÖúÐÅÏ¢µÄÌáʾ¾ø¶ÔÊǷdz£²»´íµÄÑ¡Ôñ¡£ÕâµãÔÚÌÔ±¦ÍøÉϱíÏֵñȽϳöÏÖ¡£ÏÂÃæÊÇÒ»¸ö·Ç³£¼òµ¥ ......
<script type="text/javascript">
var xmlHttp;
function createXMLHttpRequest(){
if(window.ActiveXObject){
xmlHttp=new ActiveXObject("Microsoft.XMLhTTP");
}
else if(window.XMLHttpRequest){
xmlHttp=new ......