blur() 예제
<style>
a:focus, a:active {
color: green;
}
</style>
<a id="hz" href="https://homzzang.com">홈짱닷컴 바로가기</a>
<input type="button" onclick="focusOn()" value="focus ON">
<input type="button" onclick="focusOff()" value="focus OFF">
<script>
function focusOn() {
document.getElementById("hz").focus();
}
function focusOff() {
document.getElementById("hz").blur();
}
</script>
결과보기