Any way to display javascript source from a (user defined) button

Any way to display javascript source from a (user defined) button

Hello,

Is there anyway to display the javascript source with a  (user defined)  button click.

Is there anyway to display the code that executes a specific function/ on("click" ...

Thanx ...