div 영역에 링크를 걸 수 있나요? 정보
div 영역에 링크를 걸 수 있나요?본문
div영역전체나 백그라운드 이미지에 링크를 걸고 싶은데
검색해도 해당 내용을 찾을 수 없네요^^;;
식사 맛있게 하세요~
검색해도 해당 내용을 찾을 수 없네요^^;;
식사 맛있게 하세요~
댓글 전체
<div onclick="test()">
test
</div>
<script>
function test(){
alert('test');
windows.popup("http://naver.com");
}
</script>
이런식으로 자바스크립트로 처리하면 되겠네요
test
</div>
<script>
function test(){
alert('test');
windows.popup("http://naver.com");
}
</script>
이런식으로 자바스크립트로 처리하면 되겠네요
흥힝힝님 답변 고맙습니다^^

팝업이 아니라 일반 링크라면 흥힝힝님의 소스에서
<div onclick="test()">
test
</div>
<script>
function test(){
location.href = "http://naver.com" ;
}
</script>
와 같은 식으로 처리해 주시면 될 듯 합니다.
<div onclick="test()">
test
</div>
<script>
function test(){
location.href = "http://naver.com" ;
}
</script>
와 같은 식으로 처리해 주시면 될 듯 합니다.
포트님의 세심한 배려가 담긴 답변 고맙습니다.
즐거운 점심시간 되세요^^
즐거운 점심시간 되세요^^
<div onclick="location.href='http://url'" style='cursor:pointer;'>
test
</div>
cursor을 쓰면 마우스오버시 손모양도 나옴..
test
</div>
cursor을 쓰면 마우스오버시 손모양도 나옴..
와우 중요한 정보네요!!
고맙습니다^^
고맙습니다^^