English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Manual de Referência HTML

大全 de Tags HTML

Atributo onmouseout no HTML

A propriedade onmouseout é usada para obter ou definir a função de manipulação de eventos do evento onmouseout do elemento atual

HTML event attributes

Exemplo Online

Executar JavaScript ao sair o ponteiro do mouse da imagem:

<!DOCTYPE html>
<html>
<head>
<title>Uso do atributo onmouseout no HTML (Tutoriais Básicos da Web oldtoolbag.com)</title>
</head>
<body>
<img onmousemove="bigImg(this)" onmouseout="normalImg(this)" border="0" src="pig.gif" alt="pig" width="32" height="32">
<p>Quando o ponteiro do mouse está sobre a imagem, aciona a função bigImg(). Esta função amplifica a imagem.<br>
Quando o ponteiro do mouse sai da imagem, aciona a função normalImg(). Esta função define a altura e largura da imagem como normal.</p>
<script>
function bigImg(x) {
  x.style.height = ""64px";
  x.style.width = ""64px";
px";
function normalImg(x) {
  x.style.height = ""32px";
  x.style.width = ""32px";
px";
</}
</script>
</body>
html>/Test and see ‹

Browser compatibilityIEFirefoxOperaChrome

Safari

All major browsers support the onmouseout event attribute

Definition and usage

The onmouseout attribute is triggered when the mouse pointer moves out of the element.Tip: The onmouseout attribute is usually used withused together with the

Note: The onmouseout attribute cannot be used with the following elements: <base>, <bdo>, <br>, <head>, <html>, <iframe>, <meta>, <param>, <script>, <style>, or <title>.

HTML 4.01 and HTML5Differences between

None.

Syntax

<element onmouseout="script">

Attribute value

ValueDescription
scriptSpecifies the script to be executed when the onmouseout event is triggered.
HTML event attributes