Created
November 29, 2011 19:15
-
-
Save marcosbrasil/1406029 to your computer and use it in GitHub Desktop.
Mapeamento de Imagens em HTML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript"> | |
function coordenadas(event) | |
{ | |
var x=event.clientX; | |
var y=event.clientY; | |
var coord = x + "," + y; | |
return coord; | |
} | |
function listar(event){ | |
var coord = coordenadas(event); | |
var texto = document.getElementById("listacoord"); | |
texto.value += coord + ","; | |
} | |
</script> | |
</head> | |
<body> | |
<!-- AQUI VOCE COLOCA O ENDERECO DA IMAGEM QUE QUER MAPEAR --> | |
<!-- SUBSTITUA "IMAGEM.JPG" PELA SUA IMAGEM --> | |
<img src="image_footer.png" style="border-style:none;position:absolute;top:0px;left:0px" onmousedown="listar(event)"> | |
<p style="position:absolute;top:400px;">Clique na imagem para marcar as coordenadas.<br/> | |
Copie estas coordenadas e cole dentro no atributo coords="" da tag <AREA>.<br/> | |
Não esqueça de apagar a vírgula no final do da linha gerada.</p> | |
<textarea type="text" style="position:relative;top:500px;" id="listacoord" cols="100" rows="8"></textarea> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment