Example of using UserMap in IMG

Example of using UserMap in IMG
usemap is an attribute of the <img> tag, used to specify the name of the image map to be used.

The Map in the #Map section is an image map defined with the <map> tag. Its name attribute is Map, which is defined as follows:

Copy code
The code is as follows:

<map name="Map">
<area shape=rect coordinates="100,100,200,200" href="test1.html">
<area shape=rect coordinates="200,100,300,200" href="test2.html">
...
</map>

When using:

Copy code
The code is as follows:

<img src="test.gif" usemap="#Map">

The image map divides an image into several areas. Clicking on different areas will lead to different pages.

In order to create a client image, a new attribute USEMAP needs to be added as follows:

Copy code
The code is as follows:

<IMG SRC="map_name.gif" USEMAP="#section_name">

The USEMAP attribute (use image) accepts a block-style hyperlink, so that image definition information can be stored in the same HTML file.

Copy code
The code is as follows:

<IMG src="Images/index-top.jpg" border="0" usemap="#Map" id="IMG1" onclick="return IMG1_onclick()">
<MAP name="Map">
<AREA shape="rect" coords="224,95,307,125" href="default.aspx">
<AREA shape="rect" coords="326,96,407,123" href="Cart.aspx">
<AREA shape="rect" coords="426,96,503,125" href="MemberShip/UserLogin.aspx">
<AREA shape="rect" coords="525,96,609,125" href="Admin/default.aspx">
</MAP>

<<:  Several methods to solve the problem of MySQL fuzzy query index failure

>>:  Detailed explanation of Cgroup, the core principle of Docker

Recommend

How to shrink the log file in MYSQL SERVER

The transaction log records the operations on the...

Solution to the problem of var in for loop

Preface var is a way to declare variables in ES5....

How to mount a disk in Linux and set it to automatically mount on boot

Knowing that everyone's time is precious, I w...

How to implement the jQuery carousel function

This article shares the implementation code of jQ...

MySQL trigger detailed explanation and simple example

MySQL trigger simple example grammar CREATE TRIGG...

Tutorial on installing nginx in Linux environment

Table of contents 1. Install the required environ...

MySql COALESCE function usage code example

COALESCE is a function that refers to each parame...

Summary of Nginx location and proxy_pass path configuration issues

Table of contents 1. Basic configuration of Nginx...

Dynamic starry sky background implemented with CSS3

Result:Implementation Code html <link href=...

How to hide and forge version number in Nginx

1. Use curl command to access by default: # curl ...

js to implement web calculator

How to make a simple web calculator using HTML, C...

Specific use of nginx keepalive

The default request header of the http1.1 protoco...

MySQL 5.7.18 version free installation configuration tutorial

MySQL is divided into installation version and fr...

How to implement an array lazy evaluation library in JavaScript

Table of contents Overview How to achieve it Spec...

Nginx's practical method for solving cross-domain problems

Separate the front and back ends and use nginx to...