AjaxÀúÏÕ¼Ç 1
½ñÌì³Á˶ÎÊéÉÏС´úÂ룬´úÂëÈçÏÂ
<html>
<head>
<script type="text/javascript" src="zxml.src.js"></script>
<script type="text/javascript">
function start() {
var oXmlHttp = zXmlHttp.createRequest();
oXmlHttp.open("get", "info11.txt", true);
oXmlHttp.onreadystatechange = function () {
if (oXmlHttp.readyState == 4) {
if (oXmlHttp.status==200) {
alert(oXmlHttp.responseText);
} else {
alert(oXmlHttp.statusText+oXmlHttp.status);
}
}
};
oXmlHttp.send(null);
}
</script>
</head>
<body>
<input type="button" value="button" onclick="start()" />
</body>
</html>
ÓÃFFÅÜÍêȫûÓÐÎÊÌ⣬IE8,IE6È«²¿³ö´í
´íÎóÌáʾÈçÏÂ
ÍøÒ³´íÎóÏêϸÐÅÏ¢
Óû§´úÀí: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; GTB6.4; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.1)
ʱ¼ä´Á: Thu, 22 Apr 2010 10:07:40 UTC
ÏûÏ¢: ¶ÔÏó²»Ö§³Ö´Ë²Ù×÷
ÐÐ: 23
×Ö·û: 1
´úÂë: 0
URI: http://localhost:8080/myajax/myajax.htm
23ÐжÔÓ¦´ËÐУº<input type="button" value="button" onclick="start()" />
°ÑjsÈ«²¿É¾³ý£¬Ö»Áô¿Õ·½·¨£¬Í¬Ñù±¨´í£¬¸Ä·½·¨ÃûΪfindTxt();
OK~~~˳ÀûÖ´ÐÐ
ÄѵÀieÖÐstart()ÊÇÄÚÖ÷½·¨£¿ps£ºÅÜie6ÊÇÔÚÐéÄâ»úÖУ¬ËùÒÔÓ¦¸ÃÅųýÁËϵͳÎÊÌâµÄ¿ÉÄÜ
¾ßÌåÔÒòÁô´ýÒÔºó·ÖÎö¡£ Èç¹ûÓÐÖªÇéÕߣ¬ÍûÄÜÁôÑÔÏà¸æ£¡
ÍêÃÀ½â¾öµÄ·Ö¸îÏß
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
²¥·Åʼþ£º
¡¡¡¡Óï·¨£ºstart=fileopen¡¢mouseover
¡¡¡¡ËµÃ÷£º¸ÃÊôÐԹ涨ÁËÎļþ²¥·ÅµÄʼþ£¬È±Ê¡ÖµÊÇfileopen¡£Ò²¿ÉÒÔÁ½ÕßͬʱÉèÖá£ÁíÍ⣬ÓÃÊó±êÔÚ²¥·ÅÇøÓòµã»÷һϣ¬Ò²½«Áîä¯ÀÀÆ÷¿ªÊ¼²¥·Å¸ÃÎļþ¡£
¡¡¡¡fileopen£ºÎļþ´ò¿ªÊ±£»
¡¡¡¡mouseover£ºÊó±êÒƵ½²¥·ÅÇøÓòÉÏʱ¡£
Ïà¹ØÎĵµ£º
ÓкܾÃÒ»¶Îʱ¼äÎÒµÄBLOGÉÏûÓгöÏÖAJAXÏà¹ØѶϢÁË£¬Ö÷Òªµ±È»ÊÇÒòΪ¾ø´ó²¿·ÖµÄÖØÐĶ¼·Åµ½ÁËSilverlightÉíÉÏ(¿ÉÔ¤ÆÚµÄδÀ´Ó¦¸ÃÒ²»áÊÇÈç´Ë)¡£
µ«ÓÉÓÚ¹¤×÷ÉϵÄÐèÒª£¬×î½ü»¹ÊÇ»ØÍ·¿´ÁËһϼ´½«ÍƳöµÄASP.NET Ajax Library...£¬Ë³±ãÕÒÁËÒ»ÏÂÍøÂçÉϵÄѶϢ£¬¿´Õâ¸ö̬ÊÆÎÒ²ÂÏëÓ¦¸Ã²»ÉÙASP.NET¿ª·¢ÈËÔ±ºöÂÔµôÁËÕâ¸öÆäʵÒѾbet ......
ŪÁËÒ»ÕûÌìÁË£¬¸Õ¿ªÊ¼Ñ§Ï°Jquery£¬ºÜ¶à¶«Î÷»¹²»Ê죬¿´¿´ÊÓƵ£¬²é²é×ÊÁÏ£¬ÖÕÓڳɹ¦µÄ¼¯³ÉStruts2+Jquery+Json
Ö±½ÓÉÏͼ:Óû§ÃûÊäÈëxxx,½¹µã¶ªÊ§£¬Ìáʾ”Óû§ÒÑ´æÔÚ“£¬·ñÔòÌáʾ“¿ÉÒÔ×¢²á“£¬ÃÜÂëͬÑùÈç´Ë,
Ê×ÏÈÐèÒªµ¼°ü£ºÈçϳýÁËstruts2±ØÐëµÄ°üÍ⣬»¹ÓÐjson°üÒÔ¼°Éæ¼°µÄcommonsµÄ¼¸¸ö°ü.
´ËÍâҪϠ......
ajaxÇëÇó²»·µ»Øhtml´úÂëµÄÈýÖÖ·½Ê½
ajaxÇëÇó´úÂ룺
function ajaxSend() {
$.ajax({
url: “Test_Ajax.aspx”,
type: “post”,
data: { name: “ajax” },//Èç¹ûÇëÇóµÄ×ÔÉíÒ³Ã棬ΪÁËÔÚºǫ́ÅжÏÊDz»ÊÇajaxÇëÇó
error: function(xhr, textStatus, errorThown) {
alert(errorThown) ......
// ´«¹ýÈ¥Ò»¸ö¼òµ¥Öµ£¬»ñÈ¡Ò»¸ö¼òµ¥Öµ
$.ajax({
type: "GET",
url: '<%= Url.Action("xx", "Corp") % ......
MOOTOOLSÖеķ½·¨Ê¹ÓÃ
Core.js
º¯Êý: $extend ½«µÚ¶þ¸ö²ÎÊý¶ÔÏóµÄËùÓÐÊôÐÔ¸´ÖƵ½µÚÒ»¸ö²ÎÊý¶ÔÏóÖÐ.
º¯Êý: $merge ºÏ²¢Ò»×é¶ÔÏóÉú³ÉжÔÏó
º¯Êý: $each µü´úÊý×é(°üÀ¨·Ç³£¹æÊý×é,ÈçÓÉÄÚ½¨µÄgetElementsByTagName·½·¨·µ»ØµÄ¼¯ºÏ¶ÔÏó, arguments¶ÔÏó, »òOjbect¶ÔÏó)
º¯Êý: $pick ·µ»Ø² ......