0

对于我的生活,这是行不通的,我不知道为什么..

<div class="b2s-popup" id="hideaway">
<img src="back-in-groove.jpg" usemap="b2schoolpop" />
<map name="b2schoolpop" id="b2schoolpop">
  <area shape="rect" coords="304,289,403,308" href="#" />
  <area shape="rect" coords="365,-6,426,24" href="javascript:;" onClick="document.getElementById('hideaway').style.display='none';" />
</map>
</div>
4

2 回答 2

1

我是个白痴。Usemap 应该是“#b2schoolpop”而不是“b2schoolpop”

于 2012-08-16T17:02:06.710 回答
0

尝试这个;

<div class="b2s-popup" id="hideaway">
<img src="back-in-groove.jpg" usemap="b2schoolpop" />
<map name="b2schoolpop" id="b2schoolpop">
  <area shape="rect" coords="304,289,403,308" href="#" />
  <area shape="rect" coords="365,-6,426,24" href="javascript:document.getElementById('hideaway').style.display='none';" />
</map>
</div>

或者

<div class="b2s-popup" id="hideaway">
<img src="back-in-groove.jpg" usemap="b2schoolpop" />
<map name="b2schoolpop" id="b2schoolpop">
  <area shape="rect" coords="304,289,403,308" href="#" />
  <area shape="rect" coords="365,-6,426,24" href="javascript:void(0);" onclick="javascript:document.getElementById('hideaway').style.display='none';" />
</map>
</div>
于 2012-08-16T16:56:34.173 回答