1
<img src="images/imagemap.png" width="600" height="100" border="0" usemap="#map" />

<map name="map">
<!-- #$-:Image map file created by GIMP Image Map plug-in -->
<!-- #$-:GIMP Image Map plug-in by Maurits Rijk -->
<!-- #$-:Please do not edit lines starting with "#$" -->
<!-- #$VERSION:2.3 -->
<!-- #$AUTHOR:Eric -->
<area shape="rect" coords="2,2,98,97"  onclick="scrollto1()" style="cursor: pointer;"     />
<area shape="rect" coords="102,3,202,95"  onclick="scrollto2()"  style="cursor:     pointer;" />
<area shape="rect" coords="208,3,307,95"  onclick="scrollto3()"  style="cursor: pointer;"/>
<area shape="rect" coords="315,5,409,98"  onclick="scrollto4()"  style="cursor: pointer;"/>
<area shape="rect" coords="413,6,502,97"  onclick="scrollto5()"  style="cursor: pointer;"/>
<area shape="rect" coords="507,4,597,97"  onclick="scrollto6()"  style="cursor: pointer;"/>
</map>

イメージマップは、InternetExplorer10を除くすべてのブラウザーでクリック可能です。InternetExplorerで動作させる方法があるかどうか疑問に思っています。

4

1 に答える 1

1

私はあなたのコードを更新しました、それは今働いています:)

あなたはエリアの自己閉鎖を持っていません、そしてあなたは行方不明href="#"であり、スタイルはまったく必要ありません:)

チェックしたい場合はフィドルをチェックしてください

Link : http://jsfiddle.net/MarmeeK/bD4s7/

<img src="http://images5.fanpop.com/image/photos/30600000/Template-800-x-100-pippy-and-jezzis-world-of-purdy-mindedness-30664157-800-100.jpg" width="600" height="100" border="0" usemap="#maps" alt="" />

<map name="maps">

<area shape="rect" coords="2,2,98,97"  onclick="scrollto1()" style="cursor: pointer;"     >
<area shape="rect" coords="102,3,202,95" href="#" >
<area shape="rect" coords="208,3,307,95" href="#" >
<area shape="rect" coords="315,5,409,98" href="#" >
<area shape="rect" coords="413,6,502,97" href="#" >
<area shape="rect" coords="507,4,597,97" href="#" onclick="javascript:alert('hi');" >
</map>
于 2013-03-27T05:48:55.160 に答える