我需要删除页面上 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');
});
})
关于javascript - 删除我页面中谷歌地图的 tabindex,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30531075/