Sự kiện onfocusin kích hoạt khi phần tử nhận focus (tương tự onfocus nhưng hỗ trợ bubbling).
Ví dụ
<!DOCTYPE html>
<html>
<body>
<p>Viết bên dưới:</p>
<input type="text" onfocusin="newFunc(this)">
<script>
function newFunc(x) {
x.style.background = "blue";
}
</script>
</body>
</html>