<!---- 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>
<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>
[이 게시물은 관리자님에 의해 2011-10-31 16:57:14 JavaScript에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 2230 | 16년 전 | 1288 | ||
| 2229 | 16년 전 | 2160 | ||
| 2228 | 16년 전 | 3222 | ||
| 2227 | 16년 전 | 2165 | ||
| 2226 | 16년 전 | 1748 | ||
| 2225 | 16년 전 | 1507 | ||
| 2224 |
|
16년 전 | 2042 | |
| 2223 | 16년 전 | 4723 | ||
| 2222 | 16년 전 | 1405 | ||
| 2221 |
|
16년 전 | 2142 | |
| 2220 |
|
16년 전 | 2131 | |
| 2219 |
|
16년 전 | 2400 | |
| 2218 |
|
16년 전 | 2144 | |
| 2217 |
|
16년 전 | 4434 | |
| 2216 |
|
16년 전 | 2921 | |
| 2215 | 16년 전 | 2862 | ||
| 2214 | 16년 전 | 1594 | ||
| 2213 | 16년 전 | 1235 | ||
| 2212 |
|
16년 전 | 3941 | |
| 2211 |
|
16년 전 | 1613 | |
| 2210 |
|
16년 전 | 1602 | |
| 2209 | 16년 전 | 2106 | ||
| 2208 | 16년 전 | 1878 | ||
| 2207 |
letsgolee
|
16년 전 | 1489 | |
| 2206 |
|
16년 전 | 3913 | |
| 2205 | 16년 전 | 1753 | ||
| 2204 | 16년 전 | 3133 | ||
| 2203 | 16년 전 | 3018 | ||
| 2202 | 16년 전 | 1040 | ||
| 2201 | 16년 전 | 1844 | ||
| 2200 | 16년 전 | 1589 | ||
| 2199 |
|
16년 전 | 1849 | |
| 2198 |
태양의서쪽
|
16년 전 | 2634 | |
| 2197 |
태양의서쪽
|
16년 전 | 3015 | |
| 2196 |
태양의서쪽
|
16년 전 | 3218 | |
| 2195 | 16년 전 | 3324 | ||
| 2194 | 16년 전 | 1459 | ||
| 2193 |
letsgolee
|
16년 전 | 1417 | |
| 2192 | 16년 전 | 2253 | ||
| 2191 | 16년 전 | 1972 | ||
| 2190 |
|
16년 전 | 2287 | |
| 2189 | 16년 전 | 2808 | ||
| 2188 |
Sizkein
|
16년 전 | 3260 | |
| 2187 |
letsgolee
|
16년 전 | 2356 | |
| 2186 |
Sizkein
|
16년 전 | 1632 | |
| 2185 |
Sizkein
|
16년 전 | 3203 | |
| 2184 |
Sizkein
|
16년 전 | 3061 | |
| 2183 | 16년 전 | 3039 | ||
| 2182 | 16년 전 | 3907 | ||
| 2181 | 16년 전 | 2579 | ||
| 2180 |
|
16년 전 | 2401 | |
| 2179 | 16년 전 | 2650 | ||
| 2178 | 16년 전 | 2893 | ||
| 2177 | 17년 전 | 2612 | ||
| 2176 | 17년 전 | 1451 | ||
| 2175 | 17년 전 | 1891 | ||
| 2174 | 17년 전 | 1485 | ||
| 2173 |
|
17년 전 | 1910 | |
| 2172 | 17년 전 | 2507 | ||
| 2171 | 17년 전 | 8691 | ||
| 2170 | 17년 전 | 3149 | ||
| 2169 | 17년 전 | 4236 | ||
| 2168 |
|
17년 전 | 1977 | |
| 2167 | 17년 전 | 3655 | ||
| 2166 |
|
17년 전 | 1546 | |
| 2165 | 17년 전 | 1383 | ||
| 2164 | 17년 전 | 2319 | ||
| 2163 | 17년 전 | 1314 | ||
| 2162 | 17년 전 | 1635 | ||
| 2161 | 17년 전 | 1454 | ||
| 2160 | 17년 전 | 2525 | ||
| 2159 |
inxps
|
17년 전 | 1491 | |
| 2158 |
inxps
|
17년 전 | 1091 | |
| 2157 | 17년 전 | 1220 | ||
| 2156 | 17년 전 | 3093 | ||
| 2155 | 17년 전 | 2165 | ||
| 2154 | 17년 전 | 1969 | ||
| 2153 |
|
17년 전 | 1219 | |
| 2152 |
letsgolee
|
17년 전 | 2453 | |
| 2151 | 17년 전 | 1169 | ||
| 2150 |
아름다운세상
|
17년 전 | 1124 | |
| 2149 |
아름다운세상
|
17년 전 | 1367 | |
| 2148 |
아름다운세상
|
17년 전 | 2732 | |
| 2147 |
|
17년 전 | 2396 | |
| 2146 | 17년 전 | 2482 | ||
| 2145 | 17년 전 | 1183 | ||
| 2144 | 17년 전 | 1300 | ||
| 2143 | 17년 전 | 3241 | ||
| 2142 | 17년 전 | 2830 | ||
| 2141 | 17년 전 | 4107 | ||
| 2140 | 17년 전 | 2256 | ||
| 2139 | 17년 전 | 2346 | ||
| 2138 | 17년 전 | 1394 | ||
| 2137 | 17년 전 | 2513 | ||
| 2136 | 17년 전 | 2200 | ||
| 2135 | 17년 전 | 2959 | ||
| 2134 |
아름다운세상
|
17년 전 | 2468 | |
| 2133 |
Juinjang
|
17년 전 | 1629 | |
| 2132 | 17년 전 | 2429 | ||
| 2131 | 17년 전 | 1588 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기