图像坐标链接点击提醒消息显示
问题描述:
当我点击图像坐标提醒消息显示。图像坐标链接点击提醒消息显示
如果我点击cycle seat
显示alert
像“你点击周期座”
<img src="https://www.bricklanebikes.co.uk/content/images/thumbs/0021232_6ku-fixie-single-speed-bike-beach-bum_1200.jpeg" alt="" usemap="#Map" />
<map name="Map" id="Map">
<area alt="" title="Cycle Seat" href="cycle-seat.html" shape="poly" coords="329,146,364,162,394,171,442,164,490,168,520,171,506,154,479,146,373,139,347,132,336,132,331,141,330,138" />
答
如果我正确地理解了你,你想展示一些当您点击图像地图内的区域时,会弹出警告框。 Here is a question它可以帮助你做到这一点。使用jQuery
示例代码:
$("map#Map area").on('click', function (e) { e.preventDefault(); alert($(this).attr('title')); });
在这里被更新jsfiddle。
+0
谢谢你你的回答@Stanislav Kvitash –
你的问题是什么?什么不起作用? – Xufox
上午创建一个坐标使用thhis链接http://imagemap-generator.dariodomi.de/ –
当我点击循环座位显示一些警报@Xufox –