JavaScript³öÓÚ°²È«·½ÃæµÄ¿¼ÂÇ£¬²»ÔÊÐí¿çÓòµ÷ÓÃÆäËûÒ³ÃæµÄ¶ÔÏó¡£
ʲôÊÇ¿çÓòÄØ£¿
¼òµ¥µÄÀí½â¾ÍÊÇÒòΪJavascriptͬԴ²ßÂÔµÄÏÞÖÆ£¬a.comÓòÃûϵÄjsÎÞ·¨²Ù×÷b.com»òÕßc.a.comÓòÃûϵĶÔÏó¡£
È磺www.aseoe.com/index.html µ÷ÓÃwww.aseoe.com/service.php (·Ç¿çÓò)
www.aseoe.com/index.html µ÷ÓÃwww.ancto.net/service.php (¿çÓò)
www.aseoe.com/index.html µ÷ÓÃbbs.aseoe.com/service.php (¿çÓò)
www.aseoe.com/index.html µ÷ÓÃwww.aseoe.com:81/service.php (¿çÓò)
www.aseoe.com/index.html µ÷ÓÃhttps://www.aseoe.com/service.php (¿çÓò)
´¦Àí¿çÓò·½·¨Ò» — ´úÀí
ͨ¹ýÔÚͬÃûµÄweb·þÎñÆ÷´´½¨Ò»¸ö´úÀí£º
aseoe·þÎñÆ÷£¨ÓòÃû£ºwww.aseoe.com£©
ancto·þÎñÆ÷£¨ÓòÃû£ºwww.ancto.net£©
±ÈÈçÔÚaseoeµÄweb·þÎñÆ÷µÄºǫ́
£¨www.aseoe.com/proxy-anctoservice.php£©À´µ÷ÓÃancto·þÎñÆ÷
£¨www.ancto.net/service.php£©µÄ·þÎñ£¬È»ºóÔÙ°ÑÏìÓ¦½á¹û·µ»Ø¸øÇ°¶Ë£¬
ÕâÑùÇ°¶Ëµ÷ÓÃaseoeͬÓòÃûµÄ·þÎñ¾ÍºÍanctoµÄ·þÎñЧ¹ûÏàͬÁË
´¦Àí¿çÓò·½·¨¶þ — JSONP
JSONP¿ÉÓÃÓÚ½â¾öÖ÷Á÷ä¯ÀÀÆ÷µÄ¿çÓòÊý¾Ý·ÃÎʵÄÎÊÌâ¡£
ÔÚwww.aseoe.comÒ³ÃæÖУº
<script>
function jsonp(json) {
alert(json["name"]);
}
</script>
<script src="http://www.ancto.net/jsonp.js"></script>
ÔÚwww.ancto.netÒ³ÃæÖУº
JSONP²»Ö§³ÖPOSTÇëÇó
´¦Àí¿çÓò·½·¨Èý — XHR2
HTML5ÌṩµÄXMLHttpRequest Level2 ÒѾʵÏÖÁË¿çÓò·ÃÎÊÒÔ¼°ÆäËûµÄһЩй¦ÄÜ
IE10ÒÔϵİ汾¶¼²»Ö§³Ö
ÔÚ·þÎñÆ÷×öһЩССµÄ¸ÄÔì¼´¿É£º
header('Access-Control-Allow-Origin:*');
header('Access-Control-Allow-Methods:POST,GET');
±¾Õ¾»¶ÓÈκÎÐÎʽµÄתÔØ£¬µ«ÇëÎñ±Ø×¢Ã÷³ö´¦£¬×ðÖØËûÈËÀͶ¯³É¹û
תÔØÇë×¢Ã÷£º ÎÄÕÂתÔØ×Ô£º°®Ë¼×ÊÔ´Íø http://www.aseoe.com/show-12-651-1.html
תÔØÇë×¢Ã÷£º ÎÄÕÂתÔØ×Ô£º°®Ë¼×ÊÔ´Íø http://www.aseoe.com/show-12-651-1.html