JS图像映射的应用,在一个图片点击或移动到不同位置有不同响应

JS图像映射的应用,在一个图片点击或移动到不同位置有不同响应
这里写图片描述

<html>
<head>
    <script type="text/JavaScript">
        function writeText(txt)
            {
                document.getElementById("desc").innerHTML=txt
            }
    </script>
</head>
<body>
    <img src="treatmentscheme.png" border="0" usemap="#planetmap" alt="Planets" />
    <map name="planetmap" id="planetmap">
        <area shape="circle" coords="39,188,35" onmouseover="writeText('起点坐标为(39,188)和半径为35圆形区域。')"
        href="javascript:void(0);" alt="开始"/>
        <area shape="rect" coords="125,112,233,170" onmouseover="writeText('起点坐标为(125,112)和终点坐标为(233,170)的红色矩形区域。')"
        href="#" id="HospitalDrugTag_Dict" class="hid" alt="人工关联"/>
        <area shape="rect" coords="125,212,233,270" onmouseover="writeText('起点坐标为(125,212)和终点坐标为(233,270)的红色矩形区域。')"
        href="#" class="hid" alt="待添加商品药物"/>
        <area shape="rect" coords="290,113,399,169" onmouseover="writeText('起点坐标为(290,113)和终点坐标为(399,169)的红色矩形区域。')"
        href="#" class="hid" alt="关联审核"/>
        <area shape="rect" coords="292,7,399,63" onmouseover="writeText('起点坐标为(292,7)和终点坐标为(399,63)的红色矩形区域。')"
        href="#" class="hid" alt="问题数据"/>
        <area shape="rect" coords="292,213,398,269" onmouseover="writeText('起点坐标为(292,213)和终点坐标为(398,269)的红色矩形区域。')"
        href="#" class="hid" alt="待添加商品药物审核"/>
        <area shape="rect" coords="437,161,542,217" href="javascript:void(0);" class="hid" alt="审核通过"/>
        <area shape="rect" coords="591,161,697,217" href="#" class="hid" alt="复查"/>
        <area shape="circle" coords="781,188,33" href="javascript:void(0);"  class="hid" alt="结束"/> 
    </map>
    <span style="left: 15px;top: 160px;">50</span>
    <span style="left: 180px;top: 110px;">100</span>
    <p id="desc">
    </p>
</body>
</html>
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值