> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/web/browser/event/handler/return-value.md).

# return value

[JS](/web/js.md) ⟩ [browser](/web/browser.md) ⟩ [event](/web/browser/event.md) ⟩ [handler](/web/browser/event/handler.md) ⟩ return value

{% hint style="success" %}

* in modern JavaScript, event handlers <mark style="color:yellow;">**should**</mark>**&#x20;**<mark style="color:red;">**not**</mark>**&#x20;**<mark style="color:yellow;">**return anything**</mark>.&#x20;
* in <mark style="color:yellow;">**older code**</mark>, returning <mark style="color:red;">**false**</mark> means "[**cancel default actions**](/web/browser/event/default-action/hide-or-not-to-hide.md)".
  {% endhint %}

{% tabs %}
{% tab title="👥 相關" %}

* the <mark style="color:yellow;">**return value**</mark> of an <mark style="color:yellow;">**event handler**</mark> is related to [hide or not to hide?](/web/browser/event/default-action/hide-or-not-to-hide.md).
  {% endtab %}
  {% endtabs %}
