GlobalEventHandlers.onreset
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
La propriété GlobalEventHandlers.onreset
contient Un gestionnaire d'évènement déclenché quand un évènement reset
est reçu.
Syntaxe
js
window.onreset = funcRef;
Paramètres
funcRef
est une référence à une fonction.
Exemple
html
<html>
<script>
function reg() {
window.captureEvents(Event.RESET);
window.onreset = hit;
}
function hit() {
alert("hit");
}
</script>
<body onload="reg();">
<form>
<input type="reset" value="reset" />
</form>
<div id="d"></div>
</body>
</html>
Notes
L'évènement reset
est déclenché quand l'utilisateur clique sur le bouton de réinitialisation dans un formulaire (<input type="reset"/>
).
Spécifications
Specification |
---|
HTML # event-reset |
Compatibilité des navigateurs
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
reset event |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.