image map

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Html Image Map</title>
        <script src="jquery.js"></script>
</head>
<body>
    <img src="En.png" usemap="#modelMap">
    <map id="imgmap201342591436" name="modelMap">
        <area id='1' shape="rect" coords="230,215,379,241" href="javascript:void(0)" class='ss'/>
        <area id='2' shape="rect" coords="255,524,383,550" href="javascript:void(0)" class='ss' />
        <area id='3' shape="rect" coords="523,231,629,250" href="javascript:void(0)" class='ss' />
        <area id='4' shape="rect" coords="941,343,1058,361" href="javascript:void(0)" class='ss' />
    </map>
</body>
    <script>
        $('.ss').click(function (evt) {
            console.log(evt.target.id);
        });
    </script>
</html>
原文地址:https://www.cnblogs.com/lindsayzhao103011/p/3103542.html