jsonp原理
客户端:
<script type="text/javascript">
function test(data) {
alert(data);
}
</script>
<script type="text/javascript" src=http://******.aspx/?callback=funname></script>
服务端:
var fun = Request["callback"];
Response.Write(fun+"(\"hello word\")");
<script type="text/javascript">
function test(data) {
alert(data);
}
</script>
<script type="text/javascript" src=http://******.aspx/?callback=funname></script>
服务端:
var fun = Request["callback"];
Response.Write(fun+"(\"hello word\")");