Thursday, April 2, 2026
HomeLanguagesJavascriptjQuery event.result Property

jQuery event.result Property

The jQuery event.result is an inbuilt property which is used to find the last and previous value returned by an event handler started by the specified event. 

Syntax:

event.result

Parameter: It does not accept any parameter because it is a property not a function. 

Example 1: jQuery code to show the working of event.result property.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <script src=
    </script>
    <style>
        div {
            width: 40%;
            height: 100px;
            margin: 10px;
            padding: 10px;
            display: block;
            border: 2px solid green;
        }
    </style>
</head>
  
<body>
    <div>
        <!-- click on this button -->
        <button>Click here for event result</button>
        <p></p>
    </div>
    <!-- jQuery code to show working of this property -->
    <script>
        $("button").click(function (event) {
            return "Geeks for Geeks !";
        });
        $("button").click(function (event) {
            $("p").html(event.result);
        });
    </script>
</body>
  
</html>


Output:

 

Example 2: In this example, a pop-up will show last value returned by an event handler.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <script src=
    </script>
</head>
  
<body>
    <center>
        <div>
            <!-- click on this button -->
            <button>Click here for event result</button>
        </div>
        <!-- jQuery code to show working of this property -->
        <script>
            $("button").click(function (event) {
                return "Geeks for Geeks !";
            });
            $("button").click(function (event) {
                alert(event.result);
            });
        </script>
    </center>
</body>
  
</html>


Output:

 

Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, neveropen Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

1 COMMENT

Most Popular

Dominic
32512 POSTS0 COMMENTS
Milvus
131 POSTS0 COMMENTS
Nango Kala
6885 POSTS0 COMMENTS
Nicole Veronica
12006 POSTS0 COMMENTS
Nokonwaba Nkukhwana
12100 POSTS0 COMMENTS
Shaida Kate Naidoo
7015 POSTS0 COMMENTS
Ted Musemwa
7259 POSTS0 COMMENTS
Thapelo Manthata
6971 POSTS0 COMMENTS
Umr Jansen
6960 POSTS0 COMMENTS