bubbles Event Attribute
Event Object
Definition and Usage
The bubbles event attribute returns a Boolean value that indicates whether or not the event is a bubbling event.
Event bubbling directs an event to its intended target, it works like this:
- A button is clicked and the event is directed to the button
- If an event handler is set for that object, the event is triggered
- If no event handler is set for that object, the event bubbles up (like a
bubble in water) to the objects parent
The event bubbles up from parent to parent until it is handled, or until it
reaches the document object.
Syntax
Example
Example
The following example checks if the triggered event is a bubbling event:
<html>
<head>
<script type="text/javascript">
function getEventType(event)
{
alert(event.bubbles);
}
</script>
</head>
<body onmousedown="getEventType(event)">
<p>Click somewhere in the document.
An alert box will tell if the
event is a bubbling event.</p>
</body>
</html>
|
Try it yourself »
|
Event Object

Need an easy way to get data into XML, or transform XML to another format?
MapForce lets you map XML data to/from any combination of XML, database, flat file,
Excel 2007, XBRL, or Web services data. Then it transforms data instantly or
auto-generates royalty-free code for recurrent conversions.
New features in Version 2010!
- Easy-to-use, graphical data mapping interface
- Instant data transformation
- XSLT 1.0/2.0 and XQuery code generation
- Java, C#, and C++ code generation
- Advanced data processing functions
- Support for all major relational databases including SQL Server, IBM DB2, Oracle, and more
- Visual Studio & Eclipse integration
- Available in 32-bit and 64-bit versions
Download a fully-functional trial today!
|
|
|
|