event-dom 模块基本示例

event-dom 模块专门处理 DOM 事件,若需自定义事件请使用 event-custom 模块,手势事件使用 event-dom/gesture/* 来使用相应的手势事件。

Source
Output
QRCode
<!DOCTYPE html> <html> <head> <title>event-dom模块的基本示例</title> <meta charset="utf-8"> <style type="text/css"> body{ background: #fff; } </style> <script type="text/javascript" src="//g.alicdn.com/kissy/k/5.0.1/seed.js" data-config="{ combine : true }"></script> </head> <body> <button id="shout2">shout2</button> <script type="text/javascript"> require(['event-dom'],function(DomEvent){ DomEvent.on('#shout2', 'click', function(ev){ alert('shout2'); }) }) </script> </body> </html>