I have a Simple JavaScript Function:
function f1() { alert("HI"); } I'm calling the same Javascript function from two places, say:
<input type="submit" id="btn1" onclick="f1()"/> <input type="submit" id="btn2" onclick="f1()"/> How to find the target element which called this Function?
EDIT: How to check if the element is a button or some other?
$(#btn1).click(...).