2016-04-15 69 views
0

我在我的頁面上有一個鏈接圖像地圖,但是當在移動設備上並且我點擊鏈接時,它會顯示一個彈出窗口,顯示「undefined clicked」。不知道我必須做些什麼來擺脫這一點。當點擊地圖時出現「undefined clicked」消息

這裏是我使用的代碼:

<img src="images/mobile lower menu insightful posts.png" usemap="#most_insightful_map"> 
<map name="most_insightful_map"> 
    <area shape="rect" coords="679,165,1846,303" href="link.html"> 
    <area shape="rect" coords="33,13,1202,154" href="link.html" > 
</map> 

回答

0

你沒有張貼足夠的代碼來告訴,但在問題的相似性判斷和地圖用法this problem,很可能是你有一個click類似於此的事件處理程序:

$('area').on('click', function() { 
alert($(this).attr('alt') + ' clicked'); 
}); 

需要刪除。

+0

非常好!謝謝!不知道這是爲什麼放在頁面的底部。 –

+0

@JonathanGrant沒問題,很高興你得到它的工作! –

相關問題