【问题标题】:IE doesn't populate the areas in image mapIE 不填充图像映射中的区域
【发布时间】:2016-04-17 08:20:09
【问题描述】:

我想知道这段代码和那些区域的问题在哪里 为什么它在谷歌浏览器中工作 但是当我在 IE 和 Edge 上尝试它时,它只是在正确的图像中工作 您可以在任何 html 在线编辑器中测试代码

try it here

<!DOCTYPE html>
<html>
<body>  
 <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/2/2f/Small_Flag_of_the_United_Nations_ZP.svg/488px-Small_Flag_of_the_United_Nations_ZP.svg.png"         width="145" height="126" alt="Planets" usemap="#planetmap">

<img src="http://www.hdiphonewallpapers.us/phone-wallpapers/mobilewallpaper/1293W01Z93120-34333.jpg" usemap="myMap"> 


<map name="planetmap">
 <area shape="rect" coords="0,0,82,126" href="javascript:alert('suuun');">
 <area shape="circle" coords="90,58,3"  href="javascript:alert('suuun');">
 <area shape="circle" coords="124,58,8"  href="javascript:alert('suuun');">>
</map>
<map name="myMap" >  
 <area shape="rect" coords="0,0,100,126" href="javascript:alert('suuun');">
  <area shape="rect"  id="lblTotalQtyVal" href="javascript:alert('suuun');">
  <area shape="rect" coords="3,206,152,223" id="lblTotalQty" href="javascript:alert('Hello');">
  <area id="cboWarehouse" href="javascript:alert('Hello');" shape="rect"       coords="71,21,218,39">
 <area id="lblWarehouse" href="javascript:alert('Hello');" shape="rect" coords="5,21,65,40">
  <area id="lblCurrentQtyVal" href="javascript:alert('Hello');" shape="rect" coords="3,259,79,277">
  <area id="lblCurrentQty" href="javascript:alert('Hello');" shape="rect" coords="3,246,79,259">
  <area id="lblNetQtyVal" href="javascript:alert('Hello');" shape="rect" coords="80,259,156,277">
  <area id="lblNetQty" href="javascript:alert('Hello');" shape="rect" coords="80,246,156,259">
  <area id="btnQuickUnload" href="javascript:alert('Hello');" shape="rect" coords="166,246,236,280">
  <area id="btnUnloadVan"  href="javascript:alert('Hello');" shape="rect" coords="85,283,155,317">
  <area id="btnNextScreen" href="javascript:alert('Hello');" shape="rect" coords="219,21,237,39">
  <area id="cboStatus" href="javascript:alert('Hello');" shape="rect" coords="71,40,237,58">
  <area id="lblStatus" href="javascript:alert('Hello');" shape="rect" coords="5,40,55,59">
 <area id="btnNext" href="javascript:alert('Hello');" shape="rect" coords="166,283,236,317">
 <area id="btnClear" href="javascript:alert('Hello');" shape="rect" coords="199,79,237,97">
 <area id="btnFind" href="javascript:alert('Hello');" shape="rect" coords="159,79,197,97">
  <area id="txtFind" href="javascript:alert('Hello');" shape="rect" coords="3,79,158,97">
  <area id="lblCat" href="javascript:alert('Hello');" shape="rect" coords="3,60,178,78">
  <area id="btnViewAll" href="javascript:alert('Hello');" shape="rect" coords="219,60,237,78">
  <area id="btnFavr" href="javascript:alert('Hello');" shape="rect" coords="199,60,217,78">
   <area shape="rect" coords="179,60,197,78" id="btnMore" href="javascript:alert('Hello');" >
  <area shape="rect" id="lblSelectedItem" href="javascript:alert('Hello');">
  <area  shape="rect" coords="3,283,73,317"  id="btnBack" href="javascript:alert('Hello');">
   <area shape="rect" coords="3,98,237,206" id="grdItem" href="javascript:alert('Hello');">
</map>
</body>
</html>   

【问题讨论】:

  • 您可以在jsfiddle.net 等在线编辑器中为我们设置。但是,究竟什么不起作用?你能澄清一下问题是什么吗?
  • 什么不起作用是在 IE 中填充图像上的区域,但我已修复它,请参阅我的答案

标签: html google-chrome internet-explorer


【解决方案1】:

好的,伙计们,我发现了问题 IE 需要在地图名称前加上井号 usemap="myMap" 而在 chrome 中,将名称与井号放在一起不是问题 或者没有它

&lt;img src="http://www.hdiphonewallpapers.us/phone-wallpapers/mobilewallpaper/1293W01Z93120-34333.jpg" usemap="myMap"&gt;

【讨论】:

    猜你喜欢
    • 2019-07-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-12
    • 1970-01-01
    • 2016-10-11
    • 1970-01-01
    • 2011-11-05
    相关资源
    最近更新 更多