I have anchor tag in my html file and I am calling function on click of anchor tag
function myFunction(text) {
event.preventDefault();
document.getElementById("demo").innerHTML = "text";
window.open("www.amazon.com", '_blank')
}
<a href="javascript:void(0)" onclick="myFunction('test')">Click me</a>
<p id="demo"></p>
This is the example of what I am trying to do in my scenario. As I have already passed parameter to the function so cannot pass event as parameter in function. I am using implicit "event" of java script function. Its working fine but I have never used implicit event.
I need to know whats the difference between implicit and explicit event in JavaScript function? I need to know in depth meaning of implicit event which is present in context of the function rather than the one which is passed to the function