Shishu Singh

Shishu Singh

  • NA
  • 69
  • 946

What is the use of event parameter in function(event)

Feb 3 2018 9:52 PM
Hello Champs,
 
I am new for j qyery and just trying to inhance it through https://learn.jquery.com/about-jquery/how-jquery-works , written a jquery function that
 
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8" />
<script src="script/jquery-3.3.1.min.js"></script>
<script>
$(document).ready(function () {
$("a").click(function (event) {
alert("Thanks For Visiting !");
});
});
</script>
</head>
<body>
<a href="http://jquery.com/">jQuery</a>
</body>
</html>
 Its working fine,But if  i excluded event from function(event) and run the code then no change in result Then i want to know what is the use of event here.
 

Answers (1)