<html>
<body>
<h1>HTML DOM Events</h1>
<h2>The focusin Event</h2>
<p>Assign an "onfocusin" event to an input element.</p>
Enter your name: <input type="text" id="fname" onfocusin="myFunction()">
<script>
function myFunction() {
document.getElementById("fname").style.backgroundColor = "red";
}
</script>
</body>
</html>