Form events
Syntax recap
Declaring event handlers in HTML
<html>
<body>
<script>
function handler(){
console.log('I am focussed')
}
</script>
<form>
<label>Text field</label>
<input type="text" onfocus="handler()">
</form>
</body>
</html>Declaring event handlers using JavaScript
References
PreviousDay 3: Form events, CSS transitions and modes of passing variablesNextModes of passing variables
Last updated