I've got a simple function:
function view() {
alert('blabla')
}
I can call this method with onmouseover:
<a href="#" onmouseover="view()">call</a>
or by another function:
function wrapperView() {
view()
}
Can I know the event that fires my view() function without passing another parameter to my function?
use caller.name Refered by RajaPrabhu
function view() {
alert(arguments.callee.caller.name)
}
function wrapperView() {
view()
}
wrapperView();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With