When a user clicks on an input field and it gets focus
Example
<!DOCTYPE html>
<html>
<head>
<script>
function evon(i) {
i.style.background = "grey";
}
</script>
</head>
<body>
Enter your name: <input type="text" onfocus="evon(this)">
<p>When the input field gets focus, it changes the background color.</p>
</body>
</html>
0 Comment(s)