event.resultS2C Home « Objects « event.result

Event last event handler trigger property.

Description

The event.result Event object property, contains the value of the last value returned by an event handler triggered by this event, unless the value was undefined.

Syntax


Signature Description
event.resultThe value of the last value returned by an event handler triggered by this event, unless the value was undefined.

Parameters

None.

Return

An Object object.

event.result Examplego to top of page Top

Contains the value of the last value returned by an event handler triggered by this event, unless the value was undefined.

When we press the button below the first 'click' event fires and stores the event.result property which we retrieve and display with the second event handler.



$(function(){
  $('#btn6').on('click', function(event) {
    return 'This string will be stored in event.result';
  });
  $('#btn6').on('click', function(event) {
      $('#div4').html(event.result);
  });
});

div4. Some initial text.



Press the button below to action the above code:

go to home page Homepage go to top of page Top