jsonp解决跨域问题

<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title></title>
        <script src="js/jquery-1.8.3.js" type="text/javascript" charset="utf-8"></script>
    </head>
    <body>
    </body>
    <script type="text/javascript">
        $(function(){
            $.ajax({
                type:'get',
                url:"http://bmworld.cn:1233/Mobile/V1.asmx/GetGoodsCategoryList?JsonpCallback=mianshi1&key=mianshi&StationId=1&CategoryFatherId=0",
                dataType:"jsonp",
                jsonpCallback:"mianshi1",
                async:true,
                success:function(e){
                    console.log(e);
                }
            })
        })
    </script>
</html>

 

posted @ 2016-07-04 19:17  loewe0202  阅读(119)  评论(0编辑  收藏  举报