<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ajax &#8211; LPC影子技术分享</title>
	<atom:link href="https://www.mudbest.com/category/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.mudbest.com</link>
	<description>行影不离,忘之却步.</description>
	<lastBuildDate>Fri, 23 Nov 2012 08:08:03 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>
	<item>
		<title>jquery解决AJAX跨域问题</title>
		<link>https://www.mudbest.com/jquery%e8%a7%a3%e5%86%b3ajax%e8%b7%a8%e5%9f%9f%e9%97%ae%e9%a2%98/</link>
					<comments>https://www.mudbest.com/jquery%e8%a7%a3%e5%86%b3ajax%e8%b7%a8%e5%9f%9f%e9%97%ae%e9%a2%98/#comments</comments>
		
		<dc:creator><![CDATA[hkshadow]]></dc:creator>
		<pubDate>Fri, 23 Nov 2012 08:04:55 +0000</pubDate>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[跨域]]></category>
		<guid isPermaLink="false">http://www.mudbest.com/?p=1706</guid>

					<description><![CDATA[以PHP服务端为例。 页面ajax.php 页面index.html]]></description>
										<content:encoded><![CDATA[<p>以PHP服务端为例。</p>
<p>页面ajax.php</p>
<pre class="brush: php; title: ; notranslate">
&lt;?php
//首先定义一个全局变量用于AJAX跨域返回值获取
$strJsonCallBack = $_REQUEST&#x5B;&quot;jsoncallback&quot;];
//定义一个测试数组
array&#x5B;'data'] = array('测试','再测试');
//再将数组进行JSON格式化，并在最前面加上刚刚定义的AJAX跨域返回值的标示
echo $strJsonCallBack.&quot;(&quot;.json_encode(array&#x5B;'data']).&quot;)&quot;;
exit;
?&gt;
</pre>
<p><span id="more-1706"></span><br />
页面index.html</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!--引入Jquery--&gt;
&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;&gt;&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot; language=&quot;javascript&quot;&gt;
//访问JSON服务端返回值
var url = 'http://www.mudbest.com/ajax.php'; 
//&amp;jsoncallback用于跨域获取的标示
$.getJSON(url+'&amp;jsoncallback=?', {},function(data){
        //获取返回的JSON字符串
        data = data.data;
  }
);
&lt;/script&gt;
</pre>
]]></content:encoded>
					
					<wfw:commentRss>https://www.mudbest.com/jquery%e8%a7%a3%e5%86%b3ajax%e8%b7%a8%e5%9f%9f%e9%97%ae%e9%a2%98/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Ajax简单异步传输</title>
		<link>https://www.mudbest.com/ajax%e7%ae%80%e5%8d%95%e5%bc%82%e6%ad%a5%e4%bc%a0%e8%be%93/</link>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Fri, 01 Apr 2011 04:58:07 +0000</pubDate>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[异步传输]]></category>
		<guid isPermaLink="false">http://www.mudbest.com/?p=535</guid>

					<description><![CDATA[// JavaScript Document // 异步传输 // 2011-04-01 // by hksh ... <a title="Ajax简单异步传输" class="read-more" href="https://www.mudbest.com/ajax%e7%ae%80%e5%8d%95%e5%bc%82%e6%ad%a5%e4%bc%a0%e8%be%93/" aria-label="阅读 Ajax简单异步传输">阅读更多</a>]]></description>
										<content:encoded><![CDATA[<pre class="brush: jscript; title: ; notranslate">
// JavaScript Document
// 异步传输
// 2011-04-01
// by hkshadow 
// QQ 2765237
	
	var RegHtml
	function RegHtmls() {
		if (window.ActiveXObject) {
			RegHtml = new ActiveXObject('Microsoft.XMLHTTP');
			}else if (window.XMLHttpRequest) {
				RegHtml = new XMLHttpRequest();
				}
				}
	
	function BiddingFeed(did,puser,url) {
		RegHtmls();
		RegHtml.open(&quot;GET&quot;,url+puser,true);
		RegHtml.onreadystatechange = function() {Divt(did)};
		RegHtml.send(null);
		}
	
	function Divt(did) {			
			if (RegHtml.readyState == 1)  {
		document.getElementById(did).innerHTML=&quot;loading....&quot;;
		}else if (RegHtml.readyState == 4 &amp;&amp; RegHtml.status == 200 ) {
		document.getElementById(did).innerHTML=RegHtml.responseText;
			}else{
		document.getElementById(did).innerHTML='失去通信.....请刷新';
			}
		}
</pre>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
