Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/429.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 图像地图可以在Internet Explorer中使用,但不能在Chrome中使用_Javascript_Html_Google Chrome_Firefox_Internet Explorer 11 - Fatal编程技术网

Javascript 图像地图可以在Internet Explorer中使用,但不能在Chrome中使用

Javascript 图像地图可以在Internet Explorer中使用,但不能在Chrome中使用,javascript,html,google-chrome,firefox,internet-explorer-11,Javascript,Html,Google Chrome,Firefox,Internet Explorer 11,我已经使用下面的代码设置了一个带有图像映射的页面。该映射适用于Internet Explorer 10、11、Edge和FireFox,但不适用于Chrome。知道我错过了什么吗 <center><img src="Live View.png" width="1024" height="768" border="0" usemap="#map" /></center> <map id="Map" name="Map"> <area shap

我已经使用下面的代码设置了一个带有图像映射的页面。该映射适用于Internet Explorer 10、11、Edge和FireFox,但不适用于Chrome。知道我错过了什么吗

<center><img src="Live View.png" width="1024" height="768" border="0" 
usemap="#map" /></center>
<map id="Map" name="Map">
<area shape="rect" coords="530,50,650,100" href="live view.html" target="_self" />
<area shape="rect" coords="662,58,821,118" href="Setup.html" target="_self" />
<area shape="rect" coords="315,550,370,520" href="1x1.html" target="_self" />
<area shape="rect" coords="390,550,445,520" href="2x2.html" target="_self" />
<area shape="rect" coords="455,550,505,520" href="3x3.html" target="_self" />
<area shape="rect" coords="525,550,650,520" href="fullscreen.html" target="_self" />    
</map>

您的ID不匹配。您在image元素中引用了
#map
,但是您的map的ID是
map
。标识符区分大小写

修复ID后,在Chrome中一切正常:


您的ID不匹配。您在image元素中引用了
#map
,但是您的map的ID是
map
。标识符区分大小写

修复ID后,在Chrome中一切正常: