The global <a data-l10n-name="mdn-beforeinput">beforeinput</a> event is fired on an <a data-l10n-name="mdn-input">&lt;input&gt;</a> and <a data-l10n-name="mdn-textarea">&lt;textarea&gt;</a> elements, or any element whose <a data-l10n-name="mdn-contenteditable">contenteditable</a> attribute is enabled, immediately before the element’s value changes. The event allows web apps to override the browser’s default behavior for user interaction, e.g., web apps can cancel user input only for specific characters or can modify pasting styled text only with approved styles.
Le evento global <a data-l10n-name="mdn-beforeinput">beforeinput</a> es activate sur elementos <a data-l10n-name="mdn-input">&lt;input&gt;</a> and <a data-l10n-name="mdn-textarea">&lt;textarea&gt;</a> o ulle elemento del qual es activate le attributo <a data-l10n-name="mdn-contenteditable">contenteditable</a>, immediatemente ante le cambiamentos de valor del elemento. Le evento consenti al applicationes web de supplantar le comportamento predefinite del navigator pro le interactiones del usator, e.g. web applicationes poter cancellar entrata del usator solo pro specific characteres o pote modificar le texto collate stylisate solo con stilos approbate.