当前位置: 网学 > 编程文档 > XHTML > 正文

JavaScript数据表格:冻结列、调整列宽和客户端排

来源:Http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 12/10/19
下载{$ArticleTitle}原创论文样式
sp;    {
            return;
        }
    }
    if (oEl.tagName == "TD")
        oEl = oEl.parentElement;

 var sindex = oEl.rowIndex;
 
 if (rowC >= 0)
  if (sindex == rowC)
   return;
 
 SetRowColor(sindex, RowMouseOverColor);
}

function outcolor()
{
    var oEl = event.srcElement;
 if (oEl)
    if (oEl.tagName == "DIV")
    {
        try
        {
            oEl = oEl.parentElement.parentElement;
        }
        catch (e)
        {
            return;
        }
    }
    if (oEl.tagName == "TD")
        oEl = oEl.parentElement;

 var sindex = oEl.rowIndex;
 
  if (rowC >= 0)
  if (sindex == rowC)
   return;
  
 ResetRowColor(sindex);
}

function HeadRightClick()
{
 var ev = window.event;
 var el = ev.srcElement;
 if (el.tagName == "DIV")
 {
  showMenu(ev.clientX, ev.clientY);
  ev.cancelBubble = true;
  ev.returnValue = false;
  var ep = el.parentElement;
  columnRC = ep.cellIndex;
  ep = el.parentElement.parentElement.parentElement.parentElement;
  if (ep.tagName == "TABLE")
  {
   if (ep.id == "rightHead")
    columnRC += LockCols;
  }
 }
}

function showMenu(x, y)
{
    var intRightEdge = window.document.body.clientWidth - x;
    var intBottomEdge = window.document.body.clientHeight - y;
    var intScrollLeft = window.document.body.scrollLeft + x;
    var intScrollTop = window.document.body.scrollTop + y;

    if (intRightEdge < objHeadMenu.offsetWidth)
        objHeadMenu.style.left = intScrollLeft - objHeadMenu.offsetWidth;
    else
        objHeadMenu.style.left = intScrollLeft;

    if (intBottomEdge < objHeadMenu.offsetHeight)
        objHeadMenu.style.top = intScrollTop - objHeadMenu.offsetHeight;
    else
        objHeadMenu.style.top = intScrollTop;

    objHeadMenu.style.zIndex = 50;
 
 objHeadMenu.style.filter = "blendTrans(duration=0.50) progid:DXImageTransform.Microsoft.Shadow(color=#323232, direction=135, strength=3)";
 
 if (objHeadMenu.filters.blendTrans.status != 2)
 {
  objHeadMenu.filters.blendTrans.apply();
  objHe

网学推荐

免费论文

原创论文

浏览:
设为首页 | 加入收藏 | 论文首页 | 论文专题 | 设计下载 | 网学软件 | 论文模板 | 论文资源 | 程序设计 | 关于网学 | 站内搜索 | 网学留言 | 友情链接 | 资料中心
版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved
湘ICP备09003080号