首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往
您找到你想要的搜索结果了吗?
是的
没有找到

javascript当中Map Area Shape 和onmousemove的用法

例 4.2(MapAreaShapeMouseMoveIEFF.html) <html> <head> <title> img hidefocus="true"必须加,否则ie8中点击map后,会粗线一个contour, 轮廓线</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <script type="text/javascript"> function showTip(event,txt) { var newDiv = document.getElementById('newDiv'); newDiv.style.display="block"; //clientX是鼠标指针位置相对于窗口客户区域的 x 坐标 newDiv.style.left=event.clientX+10; //必须加上10,如果不加10的话,老会闪烁 newDiv.style.top=event.clientY+5; newDiv.style.position="absolute"; //必须指定这个属性,否则newDiv层无法跟着鼠标动 newDiv.innerHTML="

" + txt + "
";; } function closeTip() { var newDiv = document.getElementById('newDiv'); newDiv.style.display="none"; } </script> <style type="text/css"> </style> </head> <body>
<map name="qixyplanetmap" id="planetmap"> us rect </map> < p>马克-to-win:注释:img 元素中的 "usemap" 属性引用 map 元素中的 "id" 或 "name" 属性(根据浏览器),所以我们同时向 map 元素添加了 "id" 和 "name" 属性。

a.矩形:必须使用四个数字,前两个数字为左上角座标,后两个数字为右下角座标

01
领券