DOM:event.detail
From MDC
Contents |
[edit] Summary
Returns additional numerical information about the event, depending on the type of event. For mouse events the value indicates the number of subsequent clicks.
[edit] Syntax
number = event.detail;
[edit] Example
<html>
<head>
<title>event.detail example</title>
<script type="text/javascript">
function giveDetails(e) {
var text = document.getElementById("t");
text.value = e.detail;
}
function init() {
var b1 = document.getElementById("b");
b1.onclick = giveDetails;
}
</script>
</head>
<body onload="init();">
<form>
<input id="b" type="button" value="details">
<input id="t" type="text" value=""><br>
<input type="reset">
</form>
</body>
</html>
[edit] Notes
For mouse events, such as click, dblclick, mousedown, or mouseup, the detail property indicates how many times the mouse has been clicked in the same location for this event.
For a dblclick event the value of detail is always 2.