zoukankan
html css js c++ java
自定义的ToolTip
var
divShow;
function
doShow(divId)
{
divShow
=
divId;
var
floatTable
=
document.all(divShow);
//
floatTable.innerHTML=sTable;
document.all(divShow).style.display
=
""
;
//
floatTable.style.position="absolute";
var
x,y;
x
=
document.body.scrollLeft
+
event.clientX;
y
=
document.body.scrollTop
+
event.clientY;
floatTable.style.posTop
=
y
+
20
;
floatTable.style.posLeft
=
x
+
20
;
}
function
doHiding(divId)
{
document.all(divId).style.display
=
"
none
"
;
}
function
dohide()
{
//
document.all("divShow").innerHTML="";
document.all(divShow).style.display
=
"
none
"
;
}
var
activeElements
=
new
Array();
var
activeElementCount
=
0
;
var
lTop, lLeft;
var
doMove
=
true
;
var
doResize
=
false
;
function
mousedown()
{
var
mp;
mp
=
findMoveable(window.event.srcElement);
if
(
!
window.event.altKey)
{
for
(i
=
0
; i
<
activeElementCount; i
++
)
{
if
(activeElements[i]
!=
mp)
{
activeElements[i].style.borderWidth
=
"
2px
"
;
}
}
if
(mp)
{
activeElements[
0
]
=
mp;
activeElementCount
=
1
;
mp.style.borderWidth
=
"
4px
"
;
}
else
{
activeElementCount
=
0
;
}
}
else
{
if
(mp)
{
if
(mp.style.borderWidth
!=
"
4px
"
)
{
activeElements[activeElementCount]
=
mp;
activeElementCount
++
;
mp.style.borderWidth
=
"
4px
"
;
}
}
}
window.status
=
activeElementCount;
lLeft
=
window.event.x;
lTop
=
window.event.y;
}
document.onmousedown
=
mousedown;
function
mousemove()
{
var
i, dLeft, dTop;
if
(window.event.button
==
1
)
{
sx
=
window.event.x;
sy
=
window.event.y;
dLeft
=
sx
-
lLeft;
dTop
=
sy
-
lTop;
for
(i
=
0
; i
<
activeElementCount; i
++
)
{
if
(doMove)
moveElement(activeElements[i], dLeft, dTop);
if
(doResize)
resizeElement(activeElements[i], dLeft, dTop);
}
lLeft
=
sx;
lTop
=
sy;
return
false
;
}
}
function
moveElement(mp, dLeft, dTop)
{
var
e
e
=
mp;
e.style.posTop
+=
dTop;
e.style.posLeft
+=
dLeft;
}
function
hide()
{
outIt();
dohide();
}
function
resizeElement(mp, dLeft, dTop)
{
var
e;
e
=
mp;
e.style.posHeight
+=
dTop;
e.style.posWidth
+=
dLeft;
}
function
findMoveable(e)
{
if
(e.moveable
==
'
true
')
return
e;
if
(e.tagName
==
"
BODY
"
)
return
null
;
return
findMoveable(e.parentElement);
}
function
findDefinedMoveable(e)
{
if
((e.moveable
==
'
true
')
||
(e.moveable
==
'
false
'))
return
e;
if
(e.tagName
==
"
BODY
"
)
return
null
;
return
findDefinedMoveable(e.parentElement);
}
function
rfalse()
{
return
false
;
}
查看全文
相关阅读:
win10补丁导致打印机无法共享
EdgexGo2.0学习-14 EdgeX2.0 AppService导出到Mqtt
EdgexGo2.0学习-13 EdgeX2.0 编译Appservice
winform程序在系统缩放150%时右边留空白问题解决办法
Linux嵌入式串口转网络
Win10 磁盘变成文件夹
Win10下使用Gitblit
JMeter学习笔记——Web接口测试(webservice)
jmeter之__RandomFromMultipleVars函数使用详解
jmeter——参数化——$__RandomFromMultipleVars()函数
原文地址:https://www.cnblogs.com/ding0910/p/820927.html
最新文章
碎碎念
Base64编码存储为图片文件
C# PNG Jpeg图片压缩
asp.net(c#)中相对路径(虚拟路径)和物理磁盘路径的转换
Request.MapPath和Server.MapPath的区别
C# HttpClient以multipart/form-data形式 提交文件和其它参数
WebClient multipart/form-data 文件上传
C#使用HttpWebRequest和HttpWebResponse上传文件示例
proj项目后期生成事件命令行
GridView BoundField break long string
热门文章
信息是如何表示和存储的
ATSS: Adaptive Training Sample Selection
MySQL:if语句、if...else语句、case语句,使用方法解析
oracle转MySQL 踩过的坑 1.1(nvl()对应ifnull(),decode()对应if)
springboot html修改后不重启生效
springboot前台不分离引用js【我】
EdgexGo2.0学习-16 Kuiper数据流定义
Go调试 could not Launch Process
EdgexGo2.0学习-15 解析yaml数据
VirtualBox 导入vdi时报错 Cannot register the hard disk because a hard disk '' with UUID already exists.
Copyright © 2011-2022 走看看