jquery AJAXÓ¦ÓÃ
load(url[,data][,callback])------------->ͨ³£ÓÃÀ´´ÓWEB·þÎñÆ÷ÉÏ»ñÈ¡¾²Ì¬µÄÊý¾ÝÎļþ
url: stringÀàÐÍ ÇëÇóHTMLÒ³ÃæµÄURLµØÖ·
data(¿ÉÑ¡): object ·¢ËÍÖÁ·þÎñÆ÷µÄkey/valueÊý¾Ý
callback(¿ÉÑ¡):function ÇëÇóÍê³Éʱ»Øµ÷º¯Êý
Àý×Ó£º
Ö÷Ò³Ãæ´úÂ룺
<style type="text/css">
* { margin:0; padding:0;}
body { font-size:12px;}
.comment { margin-top:10px; padding:10px; border:1px solid #ccc;background:#DDD;}
.comment h6 { font-weight:700; font-size:14px;}
.para { margin-top:5px; text-indent:2em;background:#DDD;}
</style>
$(function(){
$("#send").click(function(){
$("#resText").load("test.html .para",function (responseText, textStatus, //test.html .paraΪtest.htmlÖÐ.classΪparaµÄÄÚÈÝXMLHttpRequest){
alert( $(this).html() ); //ÔÚÕâÀïthisÖ¸ÏòµÄÊǵ±Ç°µÄDOM¶ÔÏ󣬼´ $("#iptText")[0]
alert(responseText); //ÇëÇ󷵻صÄÄÚÈÝ
alert(textStatus); //ÇëÇó״̬£ºsuccess£¬error
alert(XMLHttpRequest); //XMLHttpRequest¶ÔÏó
});
})
})
<input type="button" id="send" value="Ajax»ñÈ¡" />
<div class="comment">
ÒÑÓÐÆÀÂÛ£º
</div>
<div id="resText" >
Ïà¹ØÎĵµ£º
½ñÌìÙ¡ÀÏʦ½ÌÎÒÃÇʹÓÃajax¼¼ÊõÀ´Íê³ÉÊý¾Ý¿â¼¶Áª²éѯµÄÒ»¸öСÏîÄ¿£¬¿ÎÏÂÎÒ¶ÔÕâ¸öÏîÄ¿×öÁËÒÔϱʼǣº
AjaxСÏîÄ¿£ºÊ¹Óõļ¼Êõ£ºc3p0Á¬½Ó³Ø¡¢struts£¬jquery¼°Æä²å¼þ¡¢dbutil
a) ²½Ö裺ÅäÖÃc3p0µÄÊý¾Ý¿âÁ¬½Ó³Ø,µ¼Èëjar°ü£¬µ¼ÈëoracleÇý¶¯£¬
b) Ìí ......
xmlHttpÐÎʽµÄAjax£ºXmlHttpÐÎʽµÄAjax IBM¼¼ÊõÎĵµ¿â
ÒÔÏÂÊÇÀûÓÃÒþ²ØiframeʵÏÖµÄajax:
index.htm
<html>
<head>
</head>
<body>
<iframe id="testFrame" frameborder="0" style="width:0px; height:0px;">
</ifra ......
Ç°ÑÔ
×î½ü³¢ÊÔÔÚGoogle App Engine£¨GAE£©Æ½Ì¨ÉϹ¹½¨Ò»¸öblog£¬Ä¿Ç°½ø¶ÈÒѾÍê³É½«½ü50%£¬ÆäÖÐCssºÍDIV²¼¾ÖÕÛÌÚµÃÎÒ¹»Çº£¬¶ÔUIÒ»ÏòÊǸöÍâÐУ¬É«¸ÐÄÃÄóʵÔÚûÆ×£¬Ö»ºÃ·ÂÔìWordpressÁË--_--||£»
ΪºÎ²ÉÓÃAJAX£º
»Ø¸´ÊÇÔÚblogÎÄÕÂÔĶÁÖеÄÒ»¸ö³£¼ûµÄ¹¦ÄÜ£¬ÈçCSDNµÄ»Ø¸´µÈµÈ£¬µ«ÊÇÒòΪ»Ø¸´ÄÚÈݲ»¶à£¬ÉõÖÁ´ó¶àÊýʱ¼äÓ ......
WebÏîÄ¿ÖÐ×ÜÊÇ»áÓõ½Òì²½²Ù×÷£¬ÏÖÔÚµÄÒì²½²Ù×÷¿ÉÒÔÓø÷ÖÖ¸÷ÑùµÄ¿Ø¼þÀ´ÊµÏÖ£¬µ«ÊµÏÖÔÀí»¹ÊÇÒ»ÑùµÄ£¬±¾È˸üϲ»¶Ê¹ÓÃ×îÔʼµÄAjax²Ù×÷ȥʵÏÖÒì²½´¦Àí£¬±¾ÎĽöÏ׸øÄÇЩϲ»¶ÊµÏÖAjaxºÍÏîÄ¿ÖÐÒªÓõ½AjaxµÄÅóÓÑ¡£
AjaxʵÏÖÔÀí¾ÍÊÇ¿Í»§¶Ëͨ¹ýjavascript²Ù×÷µ÷Ó÷ ......
XMLHttpRequest ¶ÔÏóÊÇAJAX¹¦ÄܵĺËÐÄ£¬Òª¿ª·¢AJAX³ÌÐò±ØÐë´ÓÁ˽âXMLHttpRequest ¶ÔÏó¿ªÊ¼¡£
¡¡¡¡Á˽âXMLHttpRequest ¶ÔÏó¾ÍÏÈ´Ó´´½¨XMLHttpRequest ¶ÔÏó¿ªÊ¼£¬ÔÚ²»Í¬µÄä¯ÀÀÆ÷Öд´½¨XMLHttpRequest ¶ÔÏóʹÓò»Í¬µÄ·½·¨£º
¡¡¡¡ÏÈ¿´¿´IE´´½¨XMLHttpRequest ¶ÔÏóµÄ·½·¨(·½·¨1)£º
¡¡¡¡var xmlhttp = new ActiveXObject(" ......