Home >>jQuery Tutorial >jQuery event.result Property

jQuery event.result Property

jQuery event.result Property

jQuery event.result property in jQuery is used to consist the previous/last value returned by an event handler triggered by the event.

Syntax:

event.result

Parameter Values

Parameter Description
event It is a required parameter and is used to specify the event parameter comes from the event binding function

Here is an Example of jQuery event.result Property:


<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(".btn1").click(function(){
return "Hello how are you!";
});
$(".btn1").click(function(event){
$(".txt1").html(event.result);
});  
});
</script>
</head>
<body>
<button class="btn1">Click me to display result</button>
<p class="txt1">This is phptpoint.</p>
</body>
</html>

Output:

This is phptpoint.