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;
}
posted @
2007-07-17 11:54
blueKnight
Views(
411)
Comments()
Edit
收藏
举报
点击右上角即可分享
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步