0
我得到的數據變量充滿了所有瀏覽器中的正確響應數據,但也就是說。 在ie的所有版本中,響應是空的。?谷歌方向json空但只在資源管理器中
function getDirections(addr) {
var %id%url = encodeURI("http://maps.googleapis.com/maps/api/directions /json?origin=" + addr + "&destination=%id=maplocation%&sensor=false");
alert(%id%url); // looks good
$.getJSON(%id%url, function(data) {
alert(data); // empty in all versions of ie.. works in al other browsers
if(data.routes[0]){ //... and so on
'%id%url'不完全是一個有效的變量名稱。此代碼不可能在任何瀏覽器中運行。 – 2013-03-11 15:39:23
哪個版本的IE? – 2013-03-11 15:40:18