onfocusin 이벤트는 요소가 초점을 잃을 때 트리거됩니다. 다음 코드를 실행하여 onfocusout을 구현하는 방법을 배울 수 있습니다. 자바스크립트의 이벤트
예시
<!DOCTYPE html>
<html>
<body>
<p>Write below:</p>
<p>After losing focus, the background color of input check will change.</p>
<input type = "text" onfocusout = "newFunc(this)">
<script>
function newFunc(x) {
x.style.background = "blue";
}
</script>
</body>
</html>