XHTML » XHTML Core Tag » onmouseup


The onmouseup event is associated with the releasing up portion of a click of the mouse while inside a selected HTML tag (element). In other words, the mouse up event occurred while the HTML element was in focus. Every time you release the mouse up, while in the element, the script code of the onmouseup is executed. This script can also call functions or subroutines which contain code that you want to run when this event occurs.

The five mouse events are: onmousedown, onmousemove, onmouseout, onmouseover, and onmouseup.


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<title>DevGuru XHTML onmouseup Tag Example</title>
<input type="button"onmouseup="JavaScript: alert( 'onmouseup event' )"value="Click And Release The Mouse While Inside This Button!" />

In this example, simply place the mouse inside the button element, click down, then release up. As soon as you release up, an alert appears with a message.

Language(s): XHTML

See Also: