jquery的跨域访问

是一个jquery的插件,要配合jquery使用。

下载地址:http://smallbridge-wordpress.stor.sinaapp.com/uploads/2012/03/jquery.cross-domain-ajax.zip

下面是一个小的测试代码:

 
1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

<html>

<head>

 

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>

<script type="text/javascript" src="http://smallbridge-wordpress.stor.sinaapp.com/script/jquery.xdomainajax.js"></script>

<script type="text/javascript">

$(document).ready(

function(){

$.get('http://smallbridge.sinaapp.com/', function(res){

$('#testdiv').html(res.responseText);

});

});

</script>

 

 

<div id="testdiv"></div>

你可能感兴趣的:(jquery)