사이트 내 전체검색
깔끔한 포스트잇의 느낌을 주는 스크립트
https://cmd.kr/javascript/352 URL이 복사되었습니다.

본문

깔끔한 포스트 잇의 느낌을 주는 스크립트 입니다. 간단한 공지등에 이용하면 좋을것 같네요
===================================================
<table width='100%' height='30%' border='0' cellspacing='0' cellpadding='0' align='center'><tr>
    <td align='center' valign='middle'> <font face='Verdana' size='2' color='#000000f'>
      <style>
<!--
#postit{
position:absolute;
width:250;
padding:5px;
background-color:#EAEAEA;
border:1px solid black;
visibility:hidden;
z-index:100;
cursor:hand;
}
-->
</style>
<div id='postit' style='left:150px;top:150px'>
<div align='left'><b><a href='javascript:closeit()'>[닫기]</a></b></div>
        <p align='left'> <b>포스트잇효과의 스크립트 입니다.</b><br>
          <font face='Verdana' size='2' color='#000000'> 포스트잇의 드래그가 가능합니다 이동해보세요.<Br>
[닫기] 버튼을 누르면 창이 닫힙니다. </font>
</p>
</div>
<script>
var once_per_browser=0
var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all
if (ns4)
crossobj=document.layers.postit
else if (ie4||ns6)
crossobj=ns6? document.getElementById('postit') : document.all.postit

function closeit(){
if (ie4||ns6)
crossobj.style.visibility='hidden'
else if (ns4)
crossobj.visibility='hide'
}
function get_cookie4(Name) {
  var search = Name + '='
  var returnvalue = '';
  if (document.cookie4.length > 0) {
    offset = document.cookie4.indexOf(search)
    if (offset != -1) {
      offset += search.length
      end = document.cookie4.indexOf(';', offset);
      if (end == -1)
         end = document.cookie4.length;
      returnvalue=unescape(document.cookie4.substring(offset, end))
      }
   }
  return returnvalue;
}
function showornot(){
if (get_cookie4('postdisplay')==''){
showit()
document.cookie4='postdisplay=yes'
}
}
function showit(){
if (ie4||ns6)
crossobj.style.visibility='visible'
else if (ns4)
crossobj.visibility='show'
}
if (once_per_browser)
showornot()
else
showit()
</script>
<script language='Javascript1.2'>
function drag_drop(e){
if (ie4&&dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx
crossobj.style.top=tempy+event.clientY-offsety
return false
}
else if (ns6&&dragapproved){
crossobj.style.left=tempx+e.clientX-offsetx
crossobj.style.top=tempy+e.clientY-offsety
return false
}
}
function initializedrag(e){
if (ie4&&event.srcElement.id=='postit'||ns6&&e.target.id=='postit'){
offsetx=ie4? event.clientX : e.clientX
offsety=ie4? event.clientY : e.clientY
tempx=parseInt(crossobj.style.left)
tempy=parseInt(crossobj.style.top)
dragapproved=true
document.onmousemove=drag_drop
}
}
document.onmousedown=initializedrag
document.onmouseup=new Function('dragapproved=false')
</script>
      </font> </td>
</tr></table>

출처 : http://www.aircon1004.com/data/bbs/board.php?bo_table=pds1&wr_id=164

댓글목록

등록된 댓글이 없습니다.

831 (11/17P)

Search

Copyright © Cmd 명령어 3.138.124.28