![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
jQuery event.result Property
The event.result property in jQuery has the last/previous value returned by an event handler triggered by the specified event.
Syntax
The syntax is as follows −
event.result
Example
Let us now see an example to implement the jQuery event.result property −
<!DOCTYPE html> <html> <head> <style> .demo { color: orange; background-color: black; } </style> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ return "New text generated!"; }); $("button").click(function(event){ $("p").html(event.result); }); }); </script> </head> <body> <h2 class="demo">Heading Two</h2> <button>Click me</button> <p>This is a demo line.</p> </body> </html>
Output
This will produce the following output. This is before clicking the button −
Click the button above −
Advertisements