用jQuery获取类

WIR*_*IRN 1 jquery

我能够获得id,src,style或者其他任何东西:

$(document).click(function (e) {
       console.log('id :' + e.target.id);
});
Run Code Online (Sandbox Code Playgroud)

但我想上课,为什么不可能?

fca*_*ran 5

$(document).click(function (e) {
       console.log('class :' + e.target.className);
});
Run Code Online (Sandbox Code Playgroud)