如:在端頁面經過js獲取接口數據,使用jsonp跳過同源限制,查詢手機號歸屬地php
$.ajax({ type:"get", url:"http://tcc.taobao.com/cc/json/mobile_tel_segment.htm?tel="+telVal, dataType:"jsonp", jsonp:"callback", async:true, success:function(response,status,xhr){ console.log(response); $("#telHome").html(response.province); } });
免費生成二維碼的接口 http://qr.liantu.com/api.php?&w=200&text=html