javascript - 删除我页面中谷歌地图的 tabindex

标签 javascript google-maps-api-3

我需要删除页面上 map 的 tabindex。 我使用了下面的代码,但选项卡穿过 map 上的标记和 Google Logo 。

var map = new google.maps.Map(document.getElementById('map'),
            mapOptions);

    //Remove o TAB do mapa
      google.maps.event.addListener(map, 'tilesloaded', function() {
          var mapContent = (document.getElementById("map"));
          mapContent('a').attr('tabindex',-1);          
      });

最佳答案

建立 Vasil 的回答

google.maps.event.addListener(MAP, "tilesloaded", function(){
    [].slice.apply(document.querySelectorAll('#map a')).forEach(function(item) {
        item.setAttribute('tabindex','-1');
    });
})

Here is it in action.

关于javascript - 删除我页面中谷歌地图的 tabindex,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30531075/

相关文章:

google-maps - Google Places API 评论小工具

javascript - 谷歌地图 API 3 和 jQTouch

javascript - Google Maps V3 处理多个异步 DirectionsService.route 请求

javascript - 如何在退出时删除所有 Electron 膨胀软件?

javascript - 在 jQuery 中测试字符串是否为 XML 文档

javascript - nodejs selenium webdriverio webdriver.key(回车)

android - 谷歌地图在 android v2.2 上不显示

javascript - 如何在反向代理模式下对 Fiddler 进行编程以限制 IP 范围?

javascript - 加载 JavaScript 后如何从 URL 获取 HTML 代码

delphi - 更改来自 Delphi TWebBrowser 的 AJAX 调用的用户代理