[자바스크립트]그림위에 마우스 올리면 다른 이미지 뜨기
홈페이지 제작중에 해결되지 않는 문제가 있어서 고수분들께 질문드려요~~~
그림위에 설명박스 대신 그 설명을 이미지로 만든 이미지를 띄울려고 하는데
설명박스 만드는 소스는 HappyCGI홈페이지에서 구했는데 그걸 이미지 뜨게 하는
소스로 바꾸는게 도저히 안되요~~T.T
=======================================
전채적인 소스설명
<HTML>
<HEAD>
<TITLE> 이미지의 특정부위에 설명 상자 출력 </TITLE>
<script language="JavaScript">
<!--
//마우스 따라다니는 메세지판
function msgposit(){
message.style.posLeft = event.x + 40 + document.body.scrollLeft
message.style.posTop = event.y - 40 + document.body.scrollTop
}
function msgset(str,str2){
var text
text ='<table border="0" cellpadding="6" cellspacing="0" bgcolor="#FDFFF2" style="font-size:9pt; border-width:1; border-color:black; border-style:solid;">'
text += '<tr><td><p><b>' + str + '<br><br></b>' + str2 + '</td></tr></table>'
message.innerHTML=text
}
function msghide(){
message.innerHTML=''
}
//-->
</script>
</HEAD>
<BODY>
<!-- 메시창모양 -->
<div id="message" style="position:absolute; left:78px; top:165px; width:200px; height:62px; z-index:1; border-width:1px; border-style:none;">
<p> </p>
</div>
<!-- 이미지 -->
<p><img src="carengen.jpg" width="574" height="374" border="0" usemap="#ImageMap1">
<!-- 이미지맵 링크 -->
<map name="ImageMap1">
<area shape="rect" coords="40, 214, 94, 273" href="#" onmousemove="msgposit()" onmouseout="msghide()" onmouseover="msgset('엔진오일필터','엔진오일의 불순물을 걸러줍니다.')">
<area shape="rect" coords="243, 241, 293, 291" href="#" onmousemove="msgposit()" onmouseout="msghide()" onmouseover="msgset('엔진오일 채크기','엔진오일의 양을 채크합니다.')">
<area shape="rect" coords="376, 262, 414, 308" href="#" onmousemove="msgposit()" onmouseout="msghide()" onmouseover="msgset('냉각수 주입구','냉각수가 부족할때 보충합니다.')">
<area shape="rect" coords="426, 50, 529, 142" href="#" onmousemove="msgposit()" onmouseout="msghide()" onmouseover="msgset('배터리','차량에 필요한 전력을 공급합니다.')">
<area shape="rect" coords="354, 9, 424, 79" href="#" onmousemove="msgposit()" onmouseout="msghide()" onmouseover="msgset('공기필터','차량의 연료와 혼합되는 공기를 걸러줍니다.')">
<area shape="rect" coords="164, 121, 213, 158" href="#" onmousemove="msgposit()" onmouseout="msghide()" onmouseover="msgset('엔진오일 주입구','엔진오일을 교환할때 엔진오일을 주입하는 곳입니다.')">
<area shape="rect" coords="91, 308, 142, 350" href="#" onmousemove="msgposit()" onmouseout="msghide()" onmouseover="msgset('워셔액 주입구','차량 앞유리창의 윈도우 브러쉬에서 방사되는 워셔액을 보충하는 곳입니다.')" >
</map></p>
</BODY>
</HTML>
우선 <head>부분에 상단에 붉은색으로 표시된 스크립트를 입력합니다.
그리고 이미지 맵이 걸려있는곳에 붉은색으로 표시된 부분을 삽입하면 됩니다.
msgset부분에 재목과 설명을 입력하면 해당 단어가 롤오버했을때 출력됩니다.
========================
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 930 | 19년 전 | 3532 | ||
| 929 |
|
19년 전 | 2692 | |
| 928 |
|
19년 전 | 3440 | |
| 927 |
|
19년 전 | 3438 | |
| 926 |
|
19년 전 | 3144 | |
| 925 | 19년 전 | 5427 | ||
| 924 |
|
19년 전 | 2164 | |
| 923 |
|
19년 전 | 2210 | |
| 922 |
|
19년 전 | 2302 | |
| 921 |
|
19년 전 | 3385 | |
| 920 | 19년 전 | 3697 | ||
| 919 |
|
19년 전 | 3737 | |
| 918 |
|
19년 전 | 2342 | |
| 917 |
|
19년 전 | 2386 | |
| 916 |
|
19년 전 | 2682 | |
| 915 | 19년 전 | 3030 | ||
| 914 | 19년 전 | 2451 | ||
| 913 | 19년 전 | 2620 | ||
| 912 | 19년 전 | 2443 | ||
| 911 | 19년 전 | 2197 | ||
| 910 | 19년 전 | 3227 | ||
| 909 | 19년 전 | 3283 | ||
| 908 | 19년 전 | 3021 | ||
| 907 |
|
19년 전 | 4859 | |
| 906 |
|
19년 전 | 2692 | |
| 905 |
|
19년 전 | 3299 | |
| 904 |
|
19년 전 | 3127 | |
| 903 |
|
19년 전 | 1976 | |
| 902 |
|
19년 전 | 3117 | |
| 901 |
|
19년 전 | 1859 | |
| 900 |
|
19년 전 | 2325 | |
| 899 |
|
19년 전 | 2393 | |
| 898 |
|
19년 전 | 3976 | |
| 897 |
|
19년 전 | 3160 | |
| 896 |
|
19년 전 | 3085 | |
| 895 |
|
19년 전 | 2530 | |
| 894 |
|
19년 전 | 1996 | |
| 893 |
|
19년 전 | 1634 | |
| 892 |
|
19년 전 | 2401 | |
| 891 |
|
19년 전 | 2320 | |
| 890 |
|
19년 전 | 1811 | |
| 889 |
|
19년 전 | 1807 | |
| 888 |
|
19년 전 | 2599 | |
| 887 |
|
19년 전 | 2572 | |
| 886 |
|
19년 전 | 1871 | |
| 885 |
|
19년 전 | 2104 | |
| 884 |
|
19년 전 | 3290 | |
| 883 |
|
19년 전 | 1948 | |
| 882 |
|
19년 전 | 2485 | |
| 881 |
|
19년 전 | 2566 | |
| 880 |
|
19년 전 | 2653 | |
| 879 |
|
19년 전 | 2930 | |
| 878 |
|
19년 전 | 2556 | |
| 877 |
|
19년 전 | 2973 | |
| 876 |
|
19년 전 | 2758 | |
| 875 |
|
19년 전 | 3513 | |
| 874 | 19년 전 | 1866 | ||
| 873 | 19년 전 | 2725 | ||
| 872 |
|
19년 전 | 2363 | |
| 871 |
|
19년 전 | 2011 | |
| 870 |
|
19년 전 | 2419 | |
| 869 |
|
19년 전 | 1863 | |
| 868 |
|
19년 전 | 5436 | |
| 867 |
|
19년 전 | 2251 | |
| 866 |
|
19년 전 | 4234 | |
| 865 |
|
19년 전 | 2288 | |
| 864 | 19년 전 | 1838 | ||
| 863 | 19년 전 | 2580 | ||
| 862 | 19년 전 | 2322 | ||
| 861 | 19년 전 | 2523 | ||
| 860 | 19년 전 | 2155 | ||
| 859 | 19년 전 | 3909 | ||
| 858 | 19년 전 | 3412 | ||
| 857 | 19년 전 | 2193 | ||
| 856 |
Power
|
19년 전 | 2101 | |
| 855 | 19년 전 | 1968 | ||
| 854 | 19년 전 | 1989 | ||
| 853 |
pearly
|
19년 전 | 4366 | |
| 852 |
pearly
|
19년 전 | 3348 | |
| 851 | 19년 전 | 2769 | ||
| 850 |
pearly
|
19년 전 | 3341 | |
| 849 |
pearly
|
19년 전 | 2996 | |
| 848 |
pearly
|
19년 전 | 2836 | |
| 847 | 19년 전 | 2340 | ||
| 846 |
|
19년 전 | 2153 | |
| 845 |
pearly
|
19년 전 | 2480 | |
| 844 | 19년 전 | 3092 | ||
| 843 | 19년 전 | 2116 | ||
| 842 |
pearly
|
19년 전 | 3111 | |
| 841 |
pearly
|
19년 전 | 3239 | |
| 840 | 19년 전 | 2908 | ||
| 839 |
|
19년 전 | 1930 | |
| 838 |
|
19년 전 | 1695 | |
| 837 |
|
19년 전 | 2311 | |
| 836 |
|
19년 전 | 2246 | |
| 835 |
|
19년 전 | 1618 | |
| 834 |
|
19년 전 | 1655 | |
| 833 |
|
19년 전 | 1559 | |
| 832 |
|
19년 전 | 2061 | |
| 831 |
|
19년 전 | 1611 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기