½ÃÀÛÆäÀÌÁö·Î Áñ°Üã±âÃß°¡
·Î±×ÀÎ
ȸ¿ø°¡ÀÔ l Ã⼮üũ l ¸¶ÀÌÆäÀÌÁö l CGIMALL
happycgi
ÀÚ·á½Ç »çÀÌÆ®µî·Ï ·©Å·100 ÇÁ·Î±×·¥¸®ºä °ü¸®ÀÚÃßõÀÚ·á Ãʺ¸°¡À̵å
Ä¿¹Â´ÏƼ
Àüü ÆîÃ帱â
Äü¸Þ´º¸µÅ© jquery , CSS , PHP , Javascript , ¹«·áÆùÆ® , ASP
»ó¼¼°Ë»ö
Ȩ > JAVASCRIPT > javascript ¼Ò½ºÃ¢°í > À̹ÌÁö°ü·Ã > À̹ÌÁö¸Ê »ý¼º±â »ó¼¼Á¤º¸
»çÀÌÆ®µî·Ï
Ŭ¶ó¿ìµåű×
Javascript
PHP
asp
CSS
HTML
mysql
jquery
image
Mobile
API
slide
°Ô½ÃÆÇ
¸Þ´º
ÇöÀçÁ¢¼ÓÀÚ ¸í »õ·Î°íħ
À̹ÌÁö¸Ê »ý¼º±â
¼Ò½ºÅë°èÁ¤º¸ ¿À·ù½Å°í ¹× ¹®ÀÇ
ÇØÇÇÆÀ
³×ƼÁð
Æ®À§ÅÍ·Î º¸³»±â ÆäÀ̽ººÏÀ¸·Î º¸³»±â
¼Ò½ººÐ·ù À̹ÌÁö°ü·Ã
´Ù¿î·Îµå Ƚ¼ö 1052 ȸ
°£´Ü¼³¸í À̹ÌÁö¸Ê »ý¼º±â ÀÔ´Ï´Ù. »ç¿ë¹æ¹ýÀº µ¥¸ðÆäÀÌÁö¸¦ ¿­¾îº¸¼Å¼­ ¼ø¼­´ë·Î ÀÛµ¿ÇÏ¸é ³ªÅ¸³³´Ï´Ù. À¥¿¡¼­ Á÷Á¢ ¾µ¼öµµ ÀÖÀ¸¸ç, °¢Á¾ À̹ÌÁö¿¡ ÀÚµ¿À¸·Î ¸µÅ©¸¦ °É¼ö ÀÖ½À´Ï´Ù.
Æò°¡Çϱâ ÈǸ¢ÇÔ ¸Å¿ìÁÁÀ½ ÁÁÀ½ ±¦ÂúÀ½ º¸Åë º°·Î
ȨÆäÀÌÁö¹Ù·Î°¡±â ¼Ò½º´Ù¿î·Îµå µ¥¸ð ¹Ì¸®º¸±â ½ºÅ©·¦Çϱâ
  1. µ¥¸ðÆäÀÌÁö¸¦ ¿­¾îº¸½ÅÈÄ Ã¹¹ø° À̹ÌÁö URLÀ» ÀÔ·ÂÇϼ¼¿ä

  2. ¸µÅ©Ä¸¼ÇºÎºÐÀÇ NEW LINK¹öÆ°À» Ŭ¸¯Çϸé À̹ÌÁö°¡ ³ªÅ¸³­ºÎºÐ¿¡ ÀÛÀº À̹ÌÁö¸Êâ Çϳª°¡ ³ªÅ¸³³´Ï´Ù.

  3. À̹ÌÁö¸ÊâÀ» À̹ÌÁö¿¡ ¾Ë¸ÂÀº »çÀÌÁî·Î Á¶Á¤ÇÑÈÄ À̹ÌÁöÁÖ¼Ò¸¦ ÀÔ·ÂÇÕ´Ï´Ù.

  4. À̹ÌÁö¸Ê»ý¼ºÀ» ¿Ï·áÈÄ MAKE CODE¡é ¹öÆ°À» Ŭ¸¯ÇÏ¸é ¾Æ·¡ À̹ÌÁö¸Ê¿¡ °ü·ÃµÈ űװ¡ »ý¼ºµÇ¸ç
    À̺κÐÀ¸·Î À¥¿¡¼­ ¹Ù·Î Àû¿ë½ÃÅ°°Å³ª ÇÒ¼ö ÀÖ½À´Ï´Ù.

 

¾Æ·¡´Â º» ¿¹Á¦ÀÇ ÀÚ¹Ù½ºÅ©¸³Æ®ÀÔ´Ï´Ù.

<html>
<head>
    <title>ÇØÇÇCGI</title>

<script language="JavaScript1.2">
<!--
isIE=document.all;
isNN=!document.all&&document.getElementById;
isHot=false;
var MovableItem
var maxTiles=100
var moveObject=new Array(maxTiles)
var ActiveSwatch
//------------------
// functions
//------------------


function startMove(e){
    if (!MovableItem){return;}
    canvas=isIE ? "BODY" : "HTML";
        activeItem=isIE ? event.srcElement : e.target; 
        offsetx=isIE ? event.clientX : e.clientX;
        offsety=isIE ? event.clientY : e.clientY;
        lastX=parseInt(MovableItem.style.left);
        lastY=parseInt(MovableItem.style.top);
        lastW=parseInt(MovableItem.style.width);
        lastH=parseInt(MovableItem.style.height);
    if (offsetx+scrollAmt[0]>=(MovableItem.parentNode.offsetLeft+parseInt(MovableItem.style.left)+(MovableItem.offsetWidth*.98))|| offsety+scrollAmt[1]>=(MovableItem.parentNode.offsetTop+parseInt(MovableItem.style.top)+(MovableItem.offsetHeight*.98)) ){edge=true; MovableItem.style.cursor="se-resize"} else{edge=false;MovableItem.style.cursor="move"}
    moveEnabled=true;
    document.onmousemove=moveIt;
}

function moveIt(e){
  if (!moveEnabled||!MovableItem) return;
    // display info during testing
    MovableItem.innerHTML='<span style="position:absolute; left:0px; top:0px;">&nbsp;'+MovableItem.offsetLeft+', '+MovableItem.offsetTop+' <br>&nbsp;'+
        MovableItem.offsetWidth+', '+MovableItem.offsetHeight+' <br>'+
        '&nbsp;<b>'+(parseInt(MovableItem.id.replace('popup',''))+1)+'</b>'
        //moveObject[0].style.zIndex+' '+moveObject[1].style.zIndex+' '+moveObject[2].style.zIndex+' '+moveObject[3].style.zIndex+'</span>'
    if (edge){
          MovableItem.style.width=isIE ? event.clientX-offsetx +lastW : e.clientX-offsetx+lastW;
          MovableItem.style.height=isIE ? event.clientY-offsety +lastH : e.clientY-offsety+lastH;
        return false;
      } else{
          MovableItem.style.left=isIE ? lastX+event.clientX-offsetx : lastX+e.clientX-offsetx;
          MovableItem.style.top=isIE ? lastY+event.clientY-offsety : lastY+e.clientY-offsety;
          return false;
    } 
}


function poplayer(topObject){
  if (!topObject) {return;}
    for (var i=0; i<moveObject.length; i++){
        moveObject[i].style.borderColor='silver'
        if (moveObject[i].style.zIndex>topObject.style.zIndex-1 && moveObject[i]!=topObject)
        {moveObject[i].style.zIndex=moveObject[i].style.zIndex-1}
    }
       topObject.style.zIndex=moveObject.length-1
    topObject.style.borderColor='black'
    ActiveSwatch=topObject
    showLink(parseInt(ActiveSwatch.id.replace('popup','')))

}

function test(obj, X, Y){
    scrollAmt=puGetScrollXY(); //0 is X and 1 is Y
    //alert(X+scrollAmt[0]+' '+(obj.parentNode.offsetLeft+parseInt(obj.style.left)+(obj.offsetWidth*.98)) )
    //alert(obj.style.left+' '+obj.offsetWidth+' '+X+'  \n'+obj.style.top+' '+obj.offsetHeight+' '+Y+' '+obj.parentNode.offsetTop+' '+scrollAmt[1])
    if (X+scrollAmt[0]>=(obj.parentNode.offsetLeft+parseInt(obj.style.left)+(obj.offsetWidth*.98)) || Y+scrollAmt[1]>=(obj.parentNode.offsetTop+parseInt(obj.style.top)+(obj.offsetHeight*.98)) ) {obj.style.cursor="se-resize"} else{obj.style.cursor="move"}
}

function createTile(){
    // when user clicks the deck, deal out a new tile
    for (var i=0; i<maxTiles; i++){
        if (moveObject[i].style.visibility=="hidden"){
            moveObject[i].style.width=100
            moveObject[i].style.height=80
            moveObject[i].style.left=-10
            moveObject[i].style.top=-10
            moveObject[i].style.visibility="visible"
            moveObject[i].style.display="block"
            poplayer(moveObject[i])
            showLink(i)
        return
        }
       
    }
}

function showLink(itm){
    for (var i=0; i<maxTiles; i++){
    document.getElementById('linker'+i).style.visibility='hidden'
    document.getElementById('title'+i).style.visibility='hidden'
    document.getElementById('linker'+i).style.display='none'
    document.getElementById('title'+i).style.display='none'
    }
    document.getElementById('linker'+itm).style.visibility='visible'
    document.getElementById('title'+itm).style.visibility='visible'
    document.getElementById('linker'+itm).style.display='block'
    document.getElementById('title'+itm).style.display='block'
}

function killTile(){
    if (!ActiveSwatch){return}
    ActiveSwatch.style.visibility="hidden"
    ActiveSwatch.style.display="none"
    document.getElementById('linker'+parseInt(ActiveSwatch.id.replace('popup',''))).value=''
    document.getElementById('title'+parseInt(ActiveSwatch.id.replace('popup',''))).value=''
    ActiveSwatch=null
}


function makeWorkspace(){
    linklist=""
    workspace='<img style="position:relative" id=mapimage galleryimg=false src="http://www.blueb.co.kr/SRC/javascript/image/bmw1.jpg">'

    for (var i=0; i<maxTiles; i++){
        linklist=linklist+'<input class=links id=linker'+i+' type=text value="" >'
        linklist=linklist+'<input class=alts id=title'+i+' type=text value="" >'
        workspace=workspace+'<div class=tile id=popup'+i+' style="left:'+(i*10)+'px; top:'+(i*10)+'px; '+
        ' width:100px; height:80px;  z-Index:'+i+'; visibility:hidden;" '+
        ' title="'+(i+1)+'. drag to move or resize" onSelectStart="return false" '+
        ' onmousedown="MovableItem=this; poplayer(this); return false" '+
        ' onMouseover="isHot=true;  " '+
        ' onMousemove="test(this, event.clientX, event.clientY ) " '+
        ' onMouseout ="isHot=false"'+
        ' >&nbsp;hotspot '+(i+1)+'&nbsp;</div>'
    }

    document.getElementById('linkbox').innerHTML=linklist
    document.getElementById('workSpace').innerHTML=workspace


}

function loadImage(){
    document.getElementById('mapimage').src=document.getElementById('imageInput').value
    a=setTimeout("resizeImage()",500)
   
}
function resizeImage(){
    document.getElementById('mapimage').parentNode.style.width=document.getElementById('mapimage').offsetWidth
    document.getElementById('mapimage').parentNode.style.height=document.getElementById('mapimage').offsetHeight
}

 

function makeMap(){
    var key=Math.round(Math.random()*100)
    img=document.getElementById('mapimage')
    // removed the height as it made image disappear
    mapSource='<img src="'+img.src+'" width="'+img.offsetWidth+'" border="0" usemap="#imap_'+key+'" >'
    mapSource=mapSource+'\n<map id="imap_'+key+'" name="imap_'+key+'" >\n'
    var validMap=false
    for (var i=0; i<maxTiles; i++){
        if (moveObject[i].style.visibility=='visible'){
            mapSource=mapSource+
            '  <area shape="rect" '+
            'coords="'+moveObject[i].offsetLeft+','+moveObject[i].offsetTop+','+(moveObject[i].offsetLeft+moveObject[i].offsetWidth)+','+(moveObject[i].offsetTop+moveObject[i].offsetHeight)+'" '+
            'alt="'+document.getElementById('title'+i).value+'" '+
            'title="'+document.getElementById('title'+i).value+'" '+
            'href="'+document.getElementById('linker'+i).value+'">\n'
        validMap=true
        }
    }
    mapSource=mapSource+'</map>\n'
    if (!validMap){alert("Create links for your image first")}else {
    document.getElementById('codeWindow').value=mapSource
    }
}


function puGetScreenSize() {
    var myWidth = 0, myHeight = 0;
    if( typeof( window.innerWidth ) == 'number' ) {
        /*Non-IE*/
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
    } else if( document.documentElement &&
        ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        /*IE 6+ in 'standards compliant mode'*/
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
    } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        /*IE 4 compatible*/
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }
    return [ myWidth, myHeight ];
}

function puGetScrollXY() {
    var scrollXamt = 0, scrollYamt = 0;
    if( typeof( window.pageYOffset ) == 'number' ) {
        /*Netscape compliant*/
        scrollYamt = window.pageYOffset;
        scrollXamt = window.pageXOffset;
    } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
        /*DOM compliant*/
        scrollYamt = document.body.scrollTop;
        scrollXamt = document.body.scrollLeft;
    } else if( document.documentElement &&
        ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
        /*IE6 standards compliant mode*/
        scrollYamt = document.documentElement.scrollTop;
        scrollXamt = document.documentElement.scrollLeft;
    }
    return [ scrollXamt, scrollYamt ];
}


function Preview(displaycode) {
        var ww = window.open("","popupwindow","width=600,height=350,directories=no,menubar=yes,status=yes,toolbar=yes,resizable=yes,scrollbars=yes,screenY=0,top=0,screenX=80,left=80" );
          ww.document.writeln("<html><head><title>Preview</title></head><body>" );
        ww.document.writeln(displaycode);
        ww.document.writeln("<br clear=both><hr><form><center><input type=\"submit\" value=\"Close Window\" onClick=\"window.close();return false; \"></center></form>" );
        ww.document.writeln("</body></html>" );
        ww.document.close() ;
        if(document.focus){ ww.document.focus(true)}
}

//------------------
// initialize
//------------------
function init(){
    document.onmousedown=startMove;
    document.onmouseup=Function("moveEnabled=false; MovableItem=''");
    makeWorkspace();
    for (var i=0; i<maxTiles; i++){ moveObject[i]=document.getElementById('popup'+i)}
    ActiveSwatch=moveObject[0]
}

//-->
</script>


<style>
.intext {width: 380px; height: 24px;
    font-family:arial, sans-serif; font-size:12px; padding:3px; xvisibility:hidden;
}
.tile     {
    position:absolute; border:1px solid silver; background-color:white;
    filter:alpha(opacity=50); -moz-opacity:0.50; opacity:0.50;
    font-family:arial, sans-serif; font-size:12px; padding:3px;
    }
.links  {position:absolute; left:0px; top:0px; width: 390px; height: 24px;
    font-family:arial, sans-serif; font-size:12px; padding:3px; visibility:hidden;
    }
.alts     {position:absolute; left:0px; top:30px; width: 390px; height: 24px;
    font-family:arial, sans-serif; font-size:12px; padding:3px; visibility:hidden;
    }
.toolbtn {width:120px;line-height:20px}
</style>
</head>

<body>
<ol>
<li>À̹ÌÁö URLÀ» ÀÔ·ÂÈÄ Load Image¹öÆ°À» Ŭ¸¯<br>
<li>New Link¹öÆ°À» Ŭ¸¯ÇÏ¿© »õ·Î¿î spot¿µ¿ªÀ» »ý¼º (¿©·¯°³ »ý¼º½Ã´Â »ý¼ºÇÏ°íÀÚ ÇÏ´Â °¹¼ö¸¸Å­ Ŭ¸¯)<br>
<li>¸µÅ©ÁÖ¼Ò¿Í À̹ÌÁö¼³¸íÀ» ±âÀç<br>
<li>À̹ÌÁö À§¿¡ »ý¼ºµÈ ¸Ê¿µ¿ªÀ» µå·¡±×ÇÏ¿© ¿øÇÏ´Â À§Ä¡·Î µå·¡±×<br>
<li>¸Ê¿µ¿ª Å©±â ¼³Á¤Àº ¹Ú½º ±ÍÅüÀ̸¦ µå·¡±×ÇÏ¸é µÊ<br>
<li>Make Code¹öÆ°À» Ŭ¸¯ÇÏ¸é ¸ÊÄÚµå »ý¼º<br>
<li>Preview¹öÆ° Ŭ¸¯ÇÏ¸é ¸µÅ©µÈ ³»¿ëÀÇ ¹Ì¸®º¸±â ÇÒ ¼ö ÀÖ½¿.<br>
</ol>

<table cellspacing="1" cellpadding="3" border="0" width=610 bgcolor=999999>
<tr bgcolor=white>
    <td>Image URL</td>
    <td><input type=text id=imageInput value="http://www.blueb.co.kr/SRC/javascript/image/bmw1.jpg" class=intext></td>
    <td><input type=button class=toolbtn value="&larr; Load Image" onclick="loadImage()"></td>
</tr>
<tr bgcolor=white>
    <td align=right>Link:<br>Caption:</td>
    <td><div id=linkbox style="position:relative; top:0px; left:0px; width:400px; height:60px; overflow:hidden;"></div></td>
    <td>
        <input type=button class=toolbtn value="New Link" onclick="createTile()"><br>
        <input type=button class=toolbtn value="Remove Link" onclick="killTile()">
    </td>
</tr>
</table>
<p>
<table cellpadding=0 cellspacing=0 border=0 width=610>
<tr>
    <td style="border:1px #999999 solid"><div id=workSpace style="position:relative;"></div></td>
</tr>
</table><br>


<table width=610 cellspacing="2" cellpadding="3" border="0">
<tr>
    <td><input type=button value="Make Code &darr;" onclick="makeMap()"></td>
    <td align=right><input type=button value="Preview &rarr;" onclick="Preview(document.getElementById('codeWindow').value)"></td>
</tr>
<tr><td colspan=2><textarea id=codeWindow style="width:610; height:200px; background-color:beige"></textarea></td></tr>
</table>
<script>init()</script>


</body>
</html>


³×ƼÁð ÀÇ°ß   ÀÌ¿ëÇϽŠÀÚ·áÀÇ Èı⸦ ÀÚÀ¯·Ó°Ô ÀÛ¼ºÇϼ¼¿ä. (»ó¾÷ÀûÀÎ ±¤°í ¹× µµ¹è¼º ±Û µîÀº »çÀüÅ뺸¾øÀÌ »èÁ¦µÉ ¼ö ÀÖ½À´Ï´Ù.)
³»¿ë ¾ÆÀ̵ð ÀÇ°ß³²±â±â
µî·ÏµÈ ÀÇ°ßÀÌ ¾ø½À´Ï´Ù.
1
À̸§
³»¿ë
:³×¸Â¾Æ¿ä: :È­³ª´Â±º¿ä: :Àá¿Í: :¿ì¿ïÇØ: :À̰ǾƳÄ: :¿ÕÇÏÇÏ: ¿Õ¿ôÀ½~ ³î·¥~
Æò°¡Çϱâ ÈǸ¢ÇÔ ¸Å¿ìÁÁÀ½ ÁÁÀ½ ±¦ÂúÀ½ º¸Åë º°·Î
µµ¹è¹æÁöÅ°
 22823878 º¸ÀÌ´Â µµ¹è¹æÁöÅ°¸¦ ÀÔ·ÂÇϼ¼¿ä.