ajax跨域的解决办法
<!DOCTYPE HTML> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <title>无标题文档</title> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.js"></script> <script type="text/javascript"> //设置dataType为JSONP格式 /* $.ajax({ url:"http://test.domain.com/do?par1=1&par2=2", type:'GET', dataType:'JSONP', success: function(data){ $('body').append( "Name: " + data ); } }); */ </script> </head> <body> </body> </html>