日期:2014-05-16 浏览次数:20355 次
$.get("http://www.b.com:8080/domain2/index.jsp", {}, function(data){ alert(' error:'+data) }, "html");
//www.a.com:8080/domain1/index.jsp <script type="text/javascript"> function sayHello(result){ alert(result()); } </script> <script type="text/javascript"src="http://www.b.com:8080/domain2/index.jsp? callback=sayHello"></script> //www.b.com:8080/domain2/index.jsp <% String script="function show(){ return 'hello';}"; //String script="{name:'yuyong'}"; String callback=request.getParameter("callback"); out.println(callback+"("+script+")"); %>