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

AjaxʹÓÃʾÀý

/***************************by
garcon1986********************************/
Index.php:
<script type="text/javascript" src="ajax.js" ></script>
<a href="#" onclick="funphp('S')" >S</a>
<a href="for.php?url=E" >E</a>
<div id="idiv"></div>
for.php:
<?php
error_reporting(E_ALL ^ E_NOTICE);
if($url = $_GET[url]){
for($i=1;$i<10;$i++){
echo $url;
}
exit();
}
?>
Ajax.js:
//Ê×ÏÈÉùÃ÷±äÁ¿
var xmlHttp;
//´´½¨¶ÔÏóº¯Êý
function GetXmlHttpObject(){
try{
//Firefox, Opera, Safari
xmlHttp = new XMLHttpRequest();
}
catch(e){
try{
//MS IE 6.0+
xmlHttp = new ActiveXObject(Msxml2.XMLHTTP);
}
catch(e){
try{
//MS IS 5.5+
xmlHttp = new ActiveXObject(Microsoft.XMLHTTP);
}
catch(e){
alert("ÄúµÄä¯ÀÀÆ÷²»Ö§³ÖAJAX£¡");
return false;
}
}
}
}
//·¢ËÍÇëÇóº¯Êý
function funphp(t){
//µ÷ÓÃGetXmlHttpObjectº¯Êý
GetXmlHttpObject();
//open() ·½·¨ÐèÒªÈý¸ö²ÎÊý¡£µÚÒ»¸ö²ÎÊý¶¨Òå·¢ËÍÇëÇóËùʹÓõķ½·¨£¨GET »¹ÊÇ POST£©¡£µÚ¶þ¸ö²ÎÊý¹æ¶¨·þÎñÆ÷¶Ë½Å±¾µÄ
URL¡£µÚÈý¸ö·½·¨¹æ¶¨Ó¦µ±¶ÔÇëÇó½øÐÐÒì²½µØ´¦Àí¡£
xmlHttp.open("GET","for.php?url="+t, true);
//Ö¸¶¨ÏìÓ¦º¯Êý
xmlHttp.onreadystatechange = effect;
//·¢ËÍÇëÇó¡£µ±Ê¹ÓÃGET·½·¨Ê±£¬Ò»°ãsendÀïµÄ²ÎÊýÊÇnull¡£Èç¹ûÊÇPOST»áÓÐËù²»Í¬¡£
xmlHttp.send(null);
}
//´¦Àí·µ»ØÐÅÏ¢º¯Êý
function effect(){
if(xmlHttp.readyState == 4){
if(xmlHttp.status == 200){
var cao = xmlHttp.responseText;
document.getElementById('idiv').innerHTML = cao;
}
}
}
×¢ÊÍ£º
xmlHttpRequest.readyStateµÄ5ÖÖ״̬£º
0 (Uninitialized)
The object has been created, but not initialized (the open method has
not been called).
1 (Open)
The object has been created, but the send method has not been called.
2 (Sent)
The send method has been called. responseText is not available.
responseBody is not available.
3 (Receiving)
Some data has been received. responseText is not available. responseBody
is not available.


Ïà¹ØÎĵµ£º

jQuery AJAX»Øµ÷º¯ÊýthisÖ¸ÏòÎÊÌâ

Á˽âJavaScriptµÄÈ˶¼ÖªµÀJavaScriptµÄthis²»×ÜÊÇÖ¸Ïòµ±Ç°¶ÔÏ󣬺¯Êý»òÀàÖеÄthisÖ¸ÏòÓëµ÷ÓÃÕâ¸öº¯ÊýµÄ¶ÔÏóÒÔ¼°ÉÏÏÂÎÄ»·¾³ÊÇϢϢÏà¹ØµÄ¡£ÈçÔÚÈ«¾Ö×÷ÓÃÓòµ÷ÓÃÒ»¸öº¬thisµÄ¶ÔÏ󣬴Ëʱµ±Ç°¶ÔÏóµÄthisÖ¸ÏòµÄÊÇwindow¡£ÎªÁËÈÃthisµÄÖ¸Ïò·ûºÏ×Ô¼ºµÄÒâÔ¸£¬JavaScriptÌṩÁËÁ½¸ö·½·¨ÓÃÒԸıäthisµÄÖ¸Ïò£¬ËüÃÇÊÇcallºÍapply£¬µ±È»Ò²Ó ......

ASP.NET MVC¿ò¼Ü,ajax,jquery¿ª·¢ÏµÁпγÌ

http://www.microsoft.com/china/msdn/events/webcasts/shared/webcast/Series/MVC.aspx
http://www.cnblogs.com/chsword/archive/2009/03/11/zd_mvc1.html
jQuery¿ò¼Üѧϰ:http://www.zz68.net/WebDesign/js/200907/0H611P2009.html
ASP.NET ÖеÄÉè¼Æģʽ֮MVCƪ:http://www.cnblogs.com/superhasty/archive/2005/06/08 ......

Ajax ѧϰ±Ê¼ÇÒ» £¨IngelliJ 9.0 µÄ°²×°£©

  ÔÚÍøÉÏÏÂÁËIngelliJ9.0£¬°²×°Íê³Éºó£¬ÆȲ»¼°´ýµÄ´ò¿ª£¬È´Ìáʾ“The JVM could not be started. The main method may have thrown an exception.”  ÓÖÈ¥ÍøÉÏÕÒÁËÕÒ£¬½â¾öµÄ°ì·¨ÊÇ°ÑbinĿ¼ÏµÄidea.exe.vmoptions ÎļþÓÐд×Ö°å´ò¿ª£¬°ÑÀïÃæµÄÄÚÈݸÃΪ-Xms32m
-Xmx512m
-XX:MaxPermSize=120m
-ea
......

ASP.NET AJAX ½Ìѧ±Ê¼Ç(Èý) 2

3.4Àí½â¼Ì³Ð
Ò»£®»ùÓÚÔ­Ð͵ļ̳Уº  
²½Ö裺
(1)ÔÚ×ÓÀ๹Ô캯ÊýÖе÷ÓûùÀ๹Ô캯Êý£¬´Ó¶ø¼Ì³Ð»ùÀàµÄÊôÐÔ¡£
(2)½«»ùÀàµÄÒ»¸öÐÂʵÀý¸³¸ø×ÓÀ࣬´Ó¶ø¼Ì³Ð»ùÀàµÄ·½·¨¡£
 Samples.Cat=function() 
  {
     Samples.Pet.call(this);
   }
   Sample ......

asp ajax ²é¿´IPµÄËùÔÚµØ

index.aspÎļþ  ±£´æutf-8
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8" />
<form id="form1" name="form1" method="post">
<input name="ip" type="text" id="ip" style="width:170px" />
</form>
<mce:script type="text/javascript" src="ajaxrequest-m ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ