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

Çë½Ì¸ßÈËjquery+json+ajaxÎÊÌ⣿£¿

JS Îļþ
var test={

show:function(){

var userifo=new Array();
userifo.push(1);
userifo.push(2);
userifo.push(3);
//alert("aaa");

$.ajax({
type :'POST',
url :"http://localhost/test/test1.php",
data :'aa',
dataType :'json',
async :false,
success : function(server) {
  alert("bbb");

}
});

   
}
}

test.php Îļþ
<html>
<script type="text/javascript" src="./js/test.js"> </script>
<script type="text/javascript" src="./js/jquery-1.3.2.min.js"> </script>
<script type="text/javascript">


</script>

<body onload="test.show()">
this is my test!
</body>
</html>
test1.php
<?
echo "aaa";
?>

Ŀ¼ test ÏÂtest.php  test1.php
ÏÂÒ»¼¶ js  ÏÂjquery1.32.min.js  test.js

Ϊʲǫ̂û·´Ó¦£¿ Ó¦¸ÃÊÇÄijöÎÊÌâÁË£¿
ÔõôûÈËѽ£¡×Ô¼º¶¥£¡


ÒýÓÃ
ÆäËûµÄ»ù±¾¶¼Ã»ÎÊÌ⣬Êý¾ÝÒ²ÊÇÓзµ»ØµÄ£¬Ã»Óз´Ó¦µÄÔ­ÒòÊÇÄãAJAXÖÐÉ趨ÁËÊý¾ÝÀàÐÍΪJSON£¬
ËùÒÔ


Ïà¹ØÎÊ´ð£º

ajaxÏê½âµÄÒÉÎÊ

µÚ14Õ µÄÊ÷ÐͲ˵¥µÄÀý×Ó²»ÄÜÔÚIEÖÐÕý³£ÏÔʾ£¨Ê÷µÄ½á¹¹¿ÉÒÔÕ¹¿ª£¬µ«Õ¹¿ªºóÔÙµã»÷¾Í²»ÄÜÊÕËõÁË£©£¬µ«ÄÜÔڹȸèä¯ÀÀÆ÷ÖÐʹÓã¬Óп´´ËÊéµÄÅóÓÑÄÜÖ¸µãÏÂÂð£¿
ºÃÌù ºÇ

dfgfgfgffffff


лл¡£
......

ΪʲôҳÃæÒ»¼ÓÉÏAjax¾Í³ö´í

²é¿´Ô´Îļþʱ³öÀ´µÄ
<script type="text/javascript">
// <![CDATA[
Sys.Application.initialize();
Sys.Application.add_init(function() {
    $create(Sys.UI._Upd ......

AjaxÖлص÷º¯ÊýµÄ´¦Àí½á¹ûûÓзµ»Ø£¿

JScript code:

function callback() {
alert(18); //²âÊÔÊÇ·ñµ÷ÓÃÁËcallback»Øµ÷º¯Êý
if (httpRequest.readyState==4) {
if(httpRequest.status==200){
alert(3); //²âÊÔÊ ......

ajax³¬Ê±ÎÊÌâ

var xmlHttp = null;
function Getxmlhttp()
{
var url = "update.php";

if (xmlHttp == null)
{
xmlHttp=GetXmlHttpObject();
  if (xmlHttp==null)
  &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ