- 论坛徽章:
- 0
|
tip
var baseUrl="
http://202.101.111.24/temp/"
;
var offsetfromcursorX=12 //Customize x offset of tooltip
var offsetfromcursorY=10 //Customize y offset of tooltip
var offsetdivfrompointerX=10 //Customize x offset of tooltip DIV relative to pointer image
var offsetdivfrompointerY=14 //Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).
document.write('') //write out tooltip DIV
document.write('') //write out pointer image
var ie=document.all
var ns6=document.getElementById && !document.all
var enabletip=false
if (ie||ns6)
var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""
function ietruebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}
function showtip(thecolor){
if (ns6||ie){
var tip='';
if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
var o=event.srcElement;
if(o.tip==null && o.tip==null){
enabletip=true
return false}
tip=o.tip
tip=tip.replace(/
/g,"
")// 换行符
tipobj.innerHTML=tip.replace(/\r/g,"
")// 回车符
enabletip=true
return false
}
}
function positiontip(e){
if(!enabletip) return false;
var nondefaultpos=false
var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
//Find out how close the mouse is to the corner of the window
var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20
var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX: winwidth-e.clientX-offsetfromcursorX
var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY
var leftedge=(offsetfromcursorXtipobj.offsetWidth)
{pointerobj.src=baseUrl+"tip_bottom1.GIF"
tipobj.filters.item('DXImageTransform.Microsoft.Shadow').Direction =45}
else
{pointerobj.src=baseUrl+"tip_bottom2.GIF"
tipobj.filters.item('DXImageTransform.Microsoft.Shadow').Direction =315}
}
else{
tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
pointerobj.style.top=curY+offsetfromcursorY+"px"
}
pointerobj.style.display="block"
tipobj.style.display="block"
/*if (!nondefaultpos)
pointerobj.style.display="block"
else
//pointerobj.style.display="block"
pointerobj.style.display="none"
*/
}
function hidetip(){
if (ns6||ie){
enabletip=false
tipobj.style.display="none"
pointerobj.style.display="none"
tipobj.style.left="-1000px"
tipobj.style.backgroundColor=''
tipobj.style.width=''
}
}
document.onmousemove=positiontip
2005-4-19
·点击次数:150
·下载次数:29
·是否新课标:否
·教材版本:人教版
·所属科目:语文
·资源类型:教学辅助材料
·资源格式:audio/MP3
·资源简介:资源上传">请高手帮我看看
最右边和最下边都有问题
2005-4-19
·点击次数:150
·下载次数:29
·是否新课标:否
·教材版本:人教版
·所属科目:语文
·资源类型:教学辅助材料
·资源格式:audio/MP3
·资源简介:资源上传">请高手帮我看看
鼠标移到这里看看
鼠标移到这里看看
2005-4-19
·点击次数:150
·下载次数:29
这里左右移动层会变大"> 鼠标移到这里看看
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/15511/showart_95788.html |
|