javascript下利用for( in )语句 获得所有事件名称的代码

  events=[];for(o in document)if(/^on/.test(o))events.push(o)

  这里输入代码内容

  

   [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]