JS Image Maps
来源:互联网 发布:剑三怎么导入捏脸数据 编辑:程序博客网 时间:2024/06/06 08:56
An image-map is an image with clickable regions.
图象映象是图片的可点区域(一图片多个链接区)
Examples
举例
Simple HTML Image map[简单的图象映象]
Image map with added JavaScript[添加JS的图象映象(多了文字的说明)]
HTML Image Maps
HTML 图象映象
From our HTML tutorial we have learned that an image-map is an image with clickable regions. Normally, each region has an associated hyperlink. Clicking on one of the regions takes you to the associated link.
从HTML教程我们已经学过图象映象是图象中可点击的区域。通常每个区域都有一个相关的链接。点击后会带你去相关的连接上。
Example
举例
The example below demonstrates how to create an HTML image map, with clickable regions. Each of the regions is a hyperlink:
下面的例子演示了怎样建立一个HTML图象映象:
<img src ="planets.gif"width ="145" height ="126"alt="Planets"usemap ="#planetmap" />
<map id ="planetmap"name="planetmap"><area shape ="rect" coords ="0,0,82,126" href ="sun.htm" target ="_blank" alt="Sun" /><area shape ="circle" coords ="90,58,3" href ="mercur.htm" target ="_blank" alt="Mercury" /><area shape ="circle" coords ="124,58,8" href ="venus.htm" target ="_blank" alt="Venus" /></map>
Result结果
Adding some JavaScript
添加一些JS
We can add events (that can call a JavaScript) to the <area> tags inside the image map. The <area> tag supports the onClick, onDblClick, onMouseDown, onMouseUp, onMouseOver, onMouseMove, onMouseOut, onKeyPress, onKeyDown, onKeyUp, onFocus, and onBlur events.
我们给图片内的<area>标签里面添加一些事件(可以叫JS)。<area>标签支持onClick,onDblClick,onMouseDown,onMouseUP,onMouseOver,onMouseMove, onMouseOut, onKeyPress, onKeyDown, onKeyUp, onFocus, 和 onBlur事件
Here's the above example, with some JavaScript added:
给上面的例子加入以下JS:
<html><head><script type="text/javascript">function writeText(txt){document.getElementById("desc").innerHTML=txt}</script></head>
<body><img src="planets.gif" width="145" height="126"alt="Planets" usemap="#planetmap" /><map id ="planetmap" name="planetmap"><area shape ="rect" coords ="0,0,82,126"onMouseOver="writeText('The Sun and the gas giantplanets like Jupiter are by far the largest objectsin our Solar System.')"href ="sun.htm" target ="_blank" alt="Sun" /><area shape ="circle" coords ="90,58,3"onMouseOver="writeText('The planet Mercury is verydifficult to study from the Earth because it isalways so close to the Sun.')"href ="mercur.htm" target ="_blank" alt="Mercury" /><area shape ="circle" coords ="124,58,8"onMouseOver="writeText('Until the 1960s, Venus wasoften considered a twin sister to the Earth becauseVenus is the nearest planet to us, and because thetwo planets seem to share many characteristics.')"href ="venus.htm" target ="_blank" alt="Venus" /></map> <p id="desc"></p></body></html>
- JS Image Maps
- CSS Image Maps
- jquery图片热区jquery.image-maps
- 利用pytorch实现Visualising Image Classification Models and Saliency Maps
- maps
- maps
- Maps
- Js 对 Google Maps API 实际应用
- JS。某 image onload。
- js loading image class
- js的 new image()
- js的 new image()
- js的 new image()
- js的 new image()
- js中的new image()
- Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps 中文翻译
- Deep Inside Convolutional Networks: Visualising Image Classification Models and Saliency Maps 中文翻译
- Django使用css/js/image
- WINDOWS 2003 SERVER EBOOK COLLECTION (20 BOOKS)
- Learn In Picture EBook Series All In One
- dwr学习
- 管理J2EE的世界(上/ 下)
- 迷信和私有经济
- JS Image Maps
- 一篇关于session的好文章,写的很详细
- “青蛙吃掉虫子”的联想 谈中医
- document 文挡对象详解(JavaScript脚本语言描述)
- 如何评估开发费 (From 程序匠人)
- [整理] 常用正则表达式收集&勘误
- 只有技术架构和业务架构紧密结合才有可能真正创造出一个好的系统!
- prototype 源码解读
- 谈“中西医结合”兼评《实用中西医结合诊断治疗学》