As question describe all, but just for clarification, I want to do a common stuff like alert
value when i click on any button.
Please suggest a solution in YUI3 only because i am using YUI3.
There is a more efficient way to do it:
Y.delegate('click', function(e) { ... }, 'body', 'button');
This attaches a single event handler to the body instead of attaching a separate event handler to each button.