<!---- 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에서 이동 됨]
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 2530 |
|
15년 전 | 2625 | |
| 2529 |
|
15년 전 | 1337 | |
| 2528 | 15년 전 | 1051 | ||
| 2527 | 15년 전 | 1514 | ||
| 2526 | 15년 전 | 912 | ||
| 2525 | 15년 전 | 1208 | ||
| 2524 | 15년 전 | 1101 | ||
| 2523 | 15년 전 | 1501 | ||
| 2522 |
NY더지더지
|
15년 전 | 1636 | |
| 2521 | 15년 전 | 909 | ||
| 2520 |
|
15년 전 | 1315 | |
| 2519 |
|
15년 전 | 1107 | |
| 2518 | 15년 전 | 939 | ||
| 2517 |
|
15년 전 | 1014 | |
| 2516 | 15년 전 | 1328 | ||
| 2515 | 15년 전 | 773 | ||
| 2514 | 15년 전 | 953 | ||
| 2513 | 15년 전 | 2609 | ||
| 2512 |
|
15년 전 | 1422 | |
| 2511 |
|
15년 전 | 794 | |
| 2510 |
|
15년 전 | 826 | |
| 2509 | 15년 전 | 1270 | ||
| 2508 | 15년 전 | 1306 | ||
| 2507 | 15년 전 | 1555 | ||
| 2506 | 15년 전 | 1039 | ||
| 2505 | 15년 전 | 1402 | ||
| 2504 |
JMoon
|
15년 전 | 697 | |
| 2503 |
|
15년 전 | 1049 | |
| 2502 | 15년 전 | 1311 | ||
| 2501 | 15년 전 | 2727 | ||
| 2500 | 15년 전 | 1088 | ||
| 2499 | 15년 전 | 1059 | ||
| 2498 | 15년 전 | 964 | ||
| 2497 |
첫만남의감격
|
15년 전 | 835 | |
| 2496 |
|
15년 전 | 842 | |
| 2495 |
|
15년 전 | 3440 | |
| 2494 |
soulfuleyes
|
15년 전 | 2812 | |
| 2493 | 15년 전 | 1992 | ||
| 2492 | 15년 전 | 2440 | ||
| 2491 | 15년 전 | 1530 | ||
| 2490 | 15년 전 | 1079 | ||
| 2489 | 15년 전 | 1069 | ||
| 2488 | 15년 전 | 2343 | ||
| 2487 | 15년 전 | 891 | ||
| 2486 | 15년 전 | 1935 | ||
| 2485 |
못말리는크리스
|
15년 전 | 741 | |
| 2484 |
|
15년 전 | 1885 | |
| 2483 | 15년 전 | 821 | ||
| 2482 | 15년 전 | 2492 | ||
| 2481 | 15년 전 | 742 | ||
| 2480 | 15년 전 | 1168 | ||
| 2479 | 15년 전 | 721 | ||
| 2478 |
|
15년 전 | 2886 | |
| 2477 | 15년 전 | 1265 | ||
| 2476 | 15년 전 | 1294 | ||
| 2475 | 15년 전 | 1305 | ||
| 2474 | 15년 전 | 1368 | ||
| 2473 | 15년 전 | 980 | ||
| 2472 | 15년 전 | 1740 | ||
| 2471 | 15년 전 | 1268 | ||
| 2470 | 15년 전 | 852 | ||
| 2469 | 15년 전 | 2708 | ||
| 2468 | 15년 전 | 1096 | ||
| 2467 | 15년 전 | 1297 | ||
| 2466 | 15년 전 | 1098 | ||
| 2465 | 15년 전 | 1955 | ||
| 2464 | 15년 전 | 1971 | ||
| 2463 | 15년 전 | 1637 | ||
| 2462 | 15년 전 | 990 | ||
| 2461 | 15년 전 | 1223 | ||
| 2460 | 15년 전 | 918 | ||
| 2459 | 15년 전 | 859 | ||
| 2458 | 15년 전 | 1102 | ||
| 2457 | 15년 전 | 2463 | ||
| 2456 | 15년 전 | 2482 | ||
| 2455 | 15년 전 | 1460 | ||
| 2454 | 15년 전 | 1001 | ||
| 2453 | 15년 전 | 1156 | ||
| 2452 | 15년 전 | 1161 | ||
| 2451 | 15년 전 | 1028 | ||
| 2450 | 15년 전 | 931 | ||
| 2449 | 15년 전 | 858 | ||
| 2448 | 15년 전 | 1215 | ||
| 2447 | 15년 전 | 1170 | ||
| 2446 | 15년 전 | 914 | ||
| 2445 | 15년 전 | 888 | ||
| 2444 | 15년 전 | 1063 | ||
| 2443 | 15년 전 | 1535 | ||
| 2442 | 15년 전 | 1067 | ||
| 2441 | 15년 전 | 1390 | ||
| 2440 |
|
15년 전 | 1232 | |
| 2439 | 15년 전 | 1900 | ||
| 2438 |
|
15년 전 | 2962 | |
| 2437 |
|
15년 전 | 2292 | |
| 2436 |
|
15년 전 | 889 | |
| 2435 |
|
15년 전 | 1902 | |
| 2434 |
|
15년 전 | 2085 | |
| 2433 |
|
15년 전 | 1391 | |
| 2432 | 15년 전 | 1368 | ||
| 2431 | 15년 전 | 2632 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기