事件冒泡案例
2014-08-28 10:06
260 查看
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html onclick="alert('html');" xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>事件冒泡案例</title> </head> <body onclick="alert('body');"> <div style="width:300px; height:300px; background:red;" onclick="alert(this.style.background);"> <div style="width:200px; height:200px; background:green;" onclick="alert(this.style.background);"> <div style="width:100px; height:100px; background:#CCC;" onclick="alert(this.style.background);"> </div> </div> </div> </body> </html>
相关文章推荐
- jquery防止事件冒泡和取消默认行为案例
- js阻止冒泡事件小案例
- 【AngularJS】解决单击按钮事件中的冒泡现象
- event对象和事件冒泡应用
- Javascript 事件冒泡机制详细介绍
- jQuery event,冒泡,默认事件用法
- 阻止事件冒泡和取消浏览器默认行为
- 事件委托与阻止冒泡
- as3 冒泡事件示例。
- js事件冒泡
- JS冒泡事件的快速解决方法
- 事件捕获/事件冒泡
- jquery事件冒泡
- js阻止事件冒泡
- 什么时候用阻止事件冒泡
- ADF Faces 表格应用基础案例二:动态字段+事件处理【附样例工程】 推荐
- WPF中的事件及冒泡事件和隧道事件(预览事件)的区别
- 事件冒泡控件示例(转载)
- 事件冒泡
- JavaScript事件冒泡简介及应用