항상 같은곳에 광고창 만들기 입니다.

· 10년 전 · 733

<!---- 1. 아래의 코드를 HEAD 부분에 붙여 넣으세요 ------>

<style>
<!--
.drag{position:relative;cursor:hand
}
#scontentmain{
position:absolute;
width:150px;
}
#scontentbar{
cursor:hand;
position:absolute;
background-color:green;
height:15;
width:100%;
top:0;
}
#scontentsub{
position:absolute;
width:100%;
top:15;
background-color:lightyellow;
border:2px solid green;
padding:1.5px;
}
-->
</style>

<script language="JavaScript1.2">
<!--

var dragapproved=false
var zcor,xcor,ycor

function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function movescontentmain(){
if (event.button==1&&dragapproved){
zcor.style.pixelLeft=tempvar1+event.clientX-xcor
zcor.style.pixelTop=tempvar2+event.clientY-ycor
leftpos=document.all.scontentmain.style.pixelLeft-ietruebody().scrollLeft
toppos=document.all.scontentmain.style.pixelTop-ietruebody().scrollTop
return false
}
}
function dragscontentmain(){
if (!document.all)
return
if (event.srcElement.id=="scontentbar"){
dragapproved=true
zcor=scontentmain
tempvar1=zcor.style.pixelLeft
tempvar2=zcor.style.pixelTop
xcor=event.clientX
ycor=event.clientY
document.onmousemove=movescontentmain
}
}
document.onmousedown=dragscontentmain
document.onmouseup=new Function("dragapproved=false")
//-->
</script>

</HEAD>

<BODY>

<!--- 아래의 코드를 </body> 태그위에 붙여넣으세요 --------->

<div id="scontentmain">
        <div id="scontentbar" >
        <a href="javascript:onoffdisplay()">축소</a>
        </div>
                <div id="scontentsub">
                <p align="center"><br>
                광고창</p>
                여기에 내용을 입력 하세요
                </div>
        </div>
</div>

<script language="JavaScript1.2">

var w=ietruebody().clientWidth-195 // 화면 오른쪽 끝에서 -195 px
var h=50 // 화면 위에서 50px

w+=ietruebody().scrollLeft
h+=ietruebody().scrollTop

var leftpos=w
var toppos=h
scontentmain.style.left=w
scontentmain.style.top=h

function onoffdisplay(){
if (scontentsub.style.display=='')
scontentsub.style.display='none'
else
scontentsub.style.display=''
}

function staticize(){
w2=ietruebody().scrollLeft+leftpos
h2=ietruebody().scrollTop+toppos
scontentmain.style.left=w2
scontentmain.style.top=h2
}
window.onscroll=staticize

</script> 

|
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
9년 전 조회 1,095
9년 전 조회 827
9년 전 조회 792
9년 전 조회 757
9년 전 조회 865
9년 전 조회 768
9년 전 조회 837
9년 전 조회 951
9년 전 조회 736
9년 전 조회 782
9년 전 조회 798
9년 전 조회 931
9년 전 조회 765
9년 전 조회 889
9년 전 조회 695
9년 전 조회 785
9년 전 조회 618
9년 전 조회 829
9년 전 조회 719
9년 전 조회 739
9년 전 조회 806
9년 전 조회 748
9년 전 조회 764
9년 전 조회 732
9년 전 조회 1,107
9년 전 조회 1,139
9년 전 조회 1,132
9년 전 조회 1,071
9년 전 조회 869
9년 전 조회 1,024
9년 전 조회 1,155
10년 전 조회 830
10년 전 조회 1,129
10년 전 조회 1,103
10년 전 조회 1,506
10년 전 조회 1,122
10년 전 조회 1,306
10년 전 조회 945
10년 전 조회 1,101
10년 전 조회 821
10년 전 조회 846
10년 전 조회 955
10년 전 조회 926
10년 전 조회 1,081
10년 전 조회 845
10년 전 조회 890
10년 전 조회 872
10년 전 조회 790
10년 전 조회 891
10년 전 조회 734
10년 전 조회 795
10년 전 조회 720
10년 전 조회 811
10년 전 조회 796
10년 전 조회 1,244
10년 전 조회 769
10년 전 조회 698
10년 전 조회 957
10년 전 조회 772
10년 전 조회 739
10년 전 조회 761
10년 전 조회 710
10년 전 조회 663
10년 전 조회 633
10년 전 조회 710
10년 전 조회 724
10년 전 조회 682
10년 전 조회 627
10년 전 조회 696
10년 전 조회 691
10년 전 조회 685
10년 전 조회 765
10년 전 조회 751
10년 전 조회 656
10년 전 조회 704
10년 전 조회 763
10년 전 조회 696
10년 전 조회 802
10년 전 조회 729
10년 전 조회 675
10년 전 조회 649
10년 전 조회 672
10년 전 조회 642
10년 전 조회 665
10년 전 조회 693
10년 전 조회 657
10년 전 조회 695
10년 전 조회 667
10년 전 조회 743
10년 전 조회 855
10년 전 조회 797
10년 전 조회 778
10년 전 조회 670
10년 전 조회 789
10년 전 조회 693
10년 전 조회 717
10년 전 조회 689
10년 전 조회 665
10년 전 조회 638
10년 전 조회 676