>  기사  >  웹 프론트엔드  >  Wishing wall_javascript 스킬에 사용되는 함수

Wishing wall_javascript 스킬에 사용되는 함수

WBOY
WBOY원래의
2016-05-16 19:25:37651검색
코드 복사 코드는 다음과 같습니다.

>< ;script>
//- 스크립트의 레이어 이동 시작 제어 -->
var Obj=''
var index=10000;//z-index
document.onmouseup; =MUp
document.onmousemove=MMove

함수 MDown(Object){
Obj=Object.id
document.all(Obj).setCapture()
pX=event. x- document.all(Obj).style.pixelLeft;
pY=event.y-document.all(Obj).style.pixelTop;
}

function MMove(){
if (Obj!=''){
document.all(Obj).style.left=event.x-pX;
document.all(Obj).style.top=event.y-pY;
}
}

function MUp(){
if(Obj!=''){
document.all(Obj).releaseCapture()
Obj= '' ;
}
}

function setTagBPic(i) {
picurl = getBPic(i)
getObj('tagBPic').style.Background = " 투명 URL (" " picurl "") 왼쪽 하단 반복 스크롤 없음";
cf.tagbgpic.value = i;
}

function setTagBColor(i) {
color = getBColor(i );
getObj('preview').style.ground = '' color;
cf.tagbgcolor.value = i
}


function getBPic(i)
i = (i<1 || i>8)?1:i;
return "images/pic"parseInt(parseInt(i) 27) ".gif"
}
/ /- - 스크립트의 레이어 이동 끝 제어 -->
//포커스 가져오기
function getFocus(obj)
{
if(obj.style.zIndex!=index)
{ bling.style.zIndex=idx-1;
      }
}

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.