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