html⿏标悬停弹出⽂本框,js⽂本框或者按钮⿏标悬停提⽰说明
⽂字
html页⾯中很多元素会⽤到⽂本提⽰,当⿏标悬停之后显⽰⼀段说明⽂字;
/*显⽰说明性⽂字*/
function tips(id,str){
t= ElementById(id))-ElementById(id).offsetHeight;
l=  ElementById(id));
html内容文本框
}
/*移除说明性⽂字*/
function outtips(){
}
//获取元素的纵坐标
function getTop(e){
var offset=e.offsetTop;
if(e.offsetParent!=null) offset+=getTop(e.offsetParent);
return offset;
}
/
/获取元素的横坐标
function getLeft(e){
var offset=e.offsetLeft;
if(e.offsetParent!=null) offset+=getLeft(e.offsetParent);
return offset;
}
在需要提⽰的元素的onmouseover事件中调⽤ tips(id,str)提⽰说明,在onmouseout事件中调⽤outtips()隐藏说明

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。