작성일 : 12-02-02 16:08
|
[Script] 마우스 오버시 색상변경 [ onMouseOver ]
|
|
|
글쓴이 :
조형래
 조회 : 2,438
|
<tr> 에 삽입함 => onMouseOver=this.style.backgroundColor="#e0e0de" onMouseOut=this.style.backgroundColor="#f7f7f5"
[아래 내용은 전화영어, admin/customer/cus_tel_pr.asp 부분]
<tr bgcolor="#FFFFFF" align="center"
id="<%=arrTTT(2,i)%>"
onmouseover="MourseOver('<%=arrTTT(2,i)%>')"
onmouseout="MourseOut('<%=arrTTT(2,i)%>')"
onclick="CheckRow('<%=arrTTT(2,i)%>')"
>
<script>
function MourseOver(value) {
if (document.getElementById(value).style.backgroundColor != 'yellow') {
document.getElementById(value).style.backgroundColor = '#C5C5C5';
}
}
function MourseOut(value) {
if (document.getElementById(value).style.backgroundColor != 'yellow') {
document.getElementById(value).style.backgroundColor = '#FFFFFF';
}
}
function CheckRow(value) {
if (document.getElementById(value).style.backgroundColor != 'yellow') {
document.getElementById(value).style.backgroundColor = 'yellow';
}
else {
document.getElementById(value).style.backgroundColor = 'white';
}
}
</<script>
script>
|
|