>웹 프론트엔드 >JS 튜토리얼 >마우스를 위로 이동하면 전체 줄의 색상이 변경됩니다_JavaScript

마우스를 위로 이동하면 전체 줄의 색상이 변경됩니다_JavaScript

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB원래의
2016-05-16 19:29:251080검색

[Ctrl A select all 참고: 외부 J를 도입해야 하는 경우 실행하려면 새로 고쳐야 합니다
]<script> function overIt(){ var the_obj = event.srcElement; if(the_obj.tagName.toLowerCase() == "td"){ the_obj=the_obj.parentElement; the_obj.oBgc=the_obj.currentStyle.backgroundColor; the_obj.oFc=the_obj.currentStyle.color; the_obj.style.backgroundColor='red'; the_obj.style.color='blue'; the_obj.style.textDecoration='underline'; } } function outIt(){ var the_obj = event.srcElement; if(the_obj.tagName.toLowerCase() == "td"){ the_obj=the_obj.parentElement; the_obj.style.backgroundColor=the_obj.oBgc; the_obj.style.color=the_obj.oFc; the_obj.style.textDecoration=''; } } </script>
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.