php編寫api接口 jquery中調(diào)用天氣預(yù)報(bào)API(ajax)?
jquery中調(diào)用天氣預(yù)報(bào)API(ajax)?$.getScript(“http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js“,函數(shù)
jquery中調(diào)用天氣預(yù)報(bào)API(ajax)?
$.getScript(“http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js“,函數(shù)(u result){
if(remoteu ip)_信息.ret==“1”{
$.ajax({
type:“GET”,
url:”http://wthrcdn.etouch.cn/weatheru mini?城市=“遠(yuǎn)程ip”_信息城市,
數(shù)據(jù):“”,
成功:函數(shù)(msg){控制臺(tái).log(消息)
}
})
}
})