첫 번째 버튼과 동일한 작업을 수행해야하지만 개별 사진이있는 버튼 열이 있습니다. ID를 설정하여 글리치가 없도록하려면 어떻게해야합니까? 지금은 세 개의 버튼이 설정되어 있지만 어떻게 든 똑같은 이름을 복사했습니다 (모두 모바일 빠른 세척이라고 말합니다)!개별 마우스 오버 버튼에 대해 id를 올바르게 설정하는 방법
<STYLE MEDIA="screen" TYPE="text/css">
.pop-up {
height: 100px;
width: 100px;
margin-right: -100px;
margin-top: -100px;
position:absolute;
right:-50px;
top:75px;
}
.button {
width:300px;
height:21px;
display:block; background-image:url(images/button_ufad4.jpg);
position:absolute;
}
</style>
<a href="" class="button" onmouseover="javascript:ShowImage('images/InteriorandExteriorDetailing.jpg')" onmouseout="javascript:HideImage()"></a>
<div id="popup" class="pop-up">
<img id="popupImage" alt="" />
</div>
자바 스크립트 (전 이미지 버튼에 게시 된 HTML) : 여기에 지금까지 http://ultimatefinishdetailing.com/Services.html
HTML이 무엇
<script type="text/javascript">
function ShowImage(src)
{
var img = document.getElementById('popupImage');
var div = document.getElementById('popup');
img.src = src;
div.style.display = "block";
}
function HideImage()
{
document.getElementById('popup').style.display = "none";
}
</script>