JavaScript

[DOM_Element] JS - blur() 메서드 - 포커스 제거. (= blur메서드 = 블러 메서드) ※ 링크 클릭 잔상 제거.

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>

 

결과보기

 


분류 제목
Conversion JS - [ ] 타입변환 - (숫자: 0 , 문자열: "" , 참거짓: true)
Conversion JS - [20] 타입변환 - (숫자: 20 , 문자열: "20" , 참거짓: true)
Conversion JS - [10,20] 타입변환 - (숫자: NaN , 문자열: "10,20" , 참거짓: true)
Conversion JS - ["twenty"] 타입변환 - (숫자: NaN , 문자열: "twenty" , 참거짓: true)
Conversion JS - ["ten","twenty"] 타입변환 - (숫자: NaN , 문자열: "ten,twenty" , …
Conversion JS - function(){} 타입변환 - (숫자: NaN , 문자열: "function(){}" , 참…
Conversion JS - { } 타입변환 - (숫자: NaN , 문자열: "[object Object]" , 참거짓: tru…
Conversion JS - null 타입변환 - (숫자: 0 , 문자열: "null" , 참거짓: false)
Conversion JS - undefined 타입변환 - (숫자: NaN , 문자열: "undefined" , 참거짓: fal…
DOM_Attribute JS - Attribute Object -
DOM_Attribute JS - attribute.isId 속성 - 속성이 아이디유형인지 반환. (모든 브라우저 지원X)
DOM_Attribute JS - attr.name -
DOM_Attribute JS - attr.value - 요소 속성값 반환/설정 (= value속성 = 밸류속성)
DOM_Attribute JS - attr.specified -
DOM_Attribute JS - nodemap.getNamedItem() 메서드 -
26/89
목록
 홈  PC버전 로그인 일본어
그누앞단언어
그누뒷단언어
그외코딩언어
그누보드
제작의뢰
Q&A
커뮤니티
웹유틸
회원센터
홈짱닷컴 PC버전 로그인