Home > Web Front-end > JS Tutorial > Functions used in the wishing wall_javascript skills

Functions used in the wishing wall_javascript skills

WBOY
Release: 2016-05-16 19:25:37
Original
704 people have browsed it
Copy code The code is as follows:


< ;script>
//-- Control layer movement start of script -->
var Obj=''
var index=10000;//z-index;
document.onmouseup=MUp
document.onmousemove=MMove

function 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 = " transparent url(" " picurl "") no-repeat scroll bottom left";
cf.tagbgpic.value = i;
}

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


function getBPic(i) {
i = (i<1 || i>8)?1:i;
return "images/pic" parseInt(parseInt(i) 27) ".gif";
}
//- - Control layer movement end of script -->
//Get focus;
function getFocus(obj)
{
if(obj.style.zIndex!=index)
{ bling.style.zIndex=idx-1;
       }
}

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template