⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dtable

📁 利用ASP.NET技术完成个人网站的设计
💻
📖 第 1 页 / 共 5 页
字号:
	
	if(obj.id=='dtablejsqc')return;
    obj = obj.parentElement;
         }
     dtablejsqc.style.visibility='hidden';
    }

try
	{
DT_Listfun_clearcolor(); 
DT_cur_row = null;
DT_cur_col = null;
DT_cur_cell = null; 
	}
catch(e)
		{}
}

function DT_read_def(DT_DT_the_table){

for(var i=0;i<DT_DT_the_table.rows.length;i++){
for(var j=0;j<DT_DT_the_table.rows[i].cells.length;j++)
{
with(DT_DT_the_table.rows[i])
{
cells[j].oBgc = '';
cells[j].oFc ='';


if(i==DTable_minrowIndex-1 ){
cells[j].onmousedown = DT_Listfun_dragstart;
cells[j].onmouseup = DT_Listfun_dragend;
}
}
}
}
}

function DT_get_Element(DT_the_ele,DT_the_tag){
DT_the_tag = DT_the_tag.toLowerCase(); 
if(DT_the_ele.tagName.toLowerCase()==DT_the_tag)
{return DT_the_ele;}

while(DT_the_ele=DT_the_ele.offsetParent)
{ 
if(DT_the_ele.tagName.toLowerCase()==DT_the_tag){return DT_the_ele;}}

return(null);
}
var DT_dragStart= false;
var DT_dragColStart = null;
var DT_dragColEnd = null;


function DT_Listfun_dragstart(){
if(EnableDragCell_init==true)
{

if(DT_resize_CurState==false && DT_resize_CurDown==false)
{

 DT_resize_isre=false;
var DT_the_td = DT_get_Element(event.srcElement,'td');

if(DT_the_td==null)
{
return;
}
if(DT_the_td.cellIndex<1)
	{
return false;
	}


DT_dragStart = true;
DT_dragColStart = DT_the_td.cellIndex; 

DT_drag.style.width = DT_the_td.offsetWidth; 
DT_drag.style.height = DT_the_td.offsetHeight;

DT_drag.innerHTML = DT_the_td.innerHTML; 
DT_drag.style.backgroundColor = DT_the_td.oBgc;
DT_drag.style.color = DT_the_td.oFc;
function document.onmousemove(){

if(event.button==1)
{
if(DT_resize_CurState==false && DT_resize_isre==false && EnableDragCell_init==true)
{
DT_drag.style.display = '';
var thistop=DT_getPosition(DT_the_td).top

DT_drag.style.top = thistop ;
var thisx=window.event.screenX;

DT_drag.style.left = thisx-DT_drag.offsetWidth/2;
DT_drag.style.backgroundColor=DT_act_bgc;

for(var i=1;i<=DT_Main_Tab.rows[DTable_minrowIndex-1].cells.length-1;i++)
{
with(DT_Main_Tab.rows[DTable_minrowIndex-1].cells[i])
{

if((event.x>offsetLeft+parseInt(DT_getPosition(DT_thisTable).left) && event.x<offsetLeft+offsetWidth+ parseInt(DT_getPosition(DT_thisTable).left)))
{

runtimeStyle.backgroundColor=DT_act_bgc;
DT_dragColEnd=cellIndex;

}
else
{
runtimeStyle.backgroundColor=''; }
}// end if
}// end with


}//end for


}
DT_resize_MoveBody();
}//end EnableDragCell_init
}
}
else
{

}
}
function DT_Listfun_dragend(){
if(DT_resize_CurState==false && DT_resize_CurDown==false && DT_resize_isre==false && EnableDragCell_init==true)
{

//

DT_dragStart = false; 
DT_drag.style.display='none'; 
DT_drag.innerHTML = ''; 
DT_drag.style.width = 0;
DT_drag.style.height = 0;


for(var i=1;i<=DT_Main_Tab.rows[DTable_minrowIndex-1].cells.length-1;i++)
{
DT_Main_Tab.rows[DTable_minrowIndex-1].cells[i].runtimeStyle.backgroundColor=''; 
}
if(DT_dragColStart!=null && DT_dragColEnd!=null && DT_dragColStart!=DT_dragColEnd)
{

DT_Listfun_changecol(DT_Main_Tab,DT_dragColStart,DT_dragColEnd);

if(DT_dragColStart==DT_sort_col)
{
DT_sort_col=DT_dragColEnd;
}
else if(DT_dragColEnd==DT_sort_col)
{
DT_sort_col=DT_dragColStart; 
document.onclick();
}


}
if(DT_sort_col!=null)
{ 
with(DT_thisTable.rows[DTable_minrowIndex-1].cells[DT_sort_col])
{
removeChild(lastChild);
}
DT_sort_col=null;
}


DT_Listfun_initValue(DTable_minrowIndex-1);

DT_dragColStart = null;
DT_dragColEnd = null; 
document.onmousemove=null;

}
else if(DT_resize_CurState==true && DT_resize_CurDown==true && DT_resize_isre==true)
{

if(EnableDragCell_init==true)
{
DT_dragStart = false; 
DT_drag.style.display='none'; 
DT_drag.innerHTML = ''; 
DT_drag.style.width = 0;
DT_drag.style.height = 0;
for(var i=0;i<DT_Main_Tab.rows[DTable_minrowIndex-1].cells.length;i++)
{ DT_Main_Tab.rows[DTable_minrowIndex-1].cells[i].runtimeStyle.backgroundColor=''; }
if(DT_dragColStart!=null && DT_dragColEnd!=null && DT_dragColStart!=DT_dragColEnd) {
DT_Listfun_changecol(DT_Main_Tab,DT_dragColStart,DT_dragColEnd);
if(DT_dragColStart==DT_sort_col)
{
DT_sort_col=DT_dragColEnd;
}
else if(DT_dragColEnd==DT_sort_col){
DT_sort_col=DT_dragColStart; 
document.onclick();
}
}


}
DT_dragColStart = null;
DT_dragColEnd = null; 
document.onmousemove=null;
UpBody();

}

}

function DT_Listfun_clearcolor(){ 
DT_the_table=DT_Main_Tab;
if(DT_cur_col!=null){ 
for(i=DTable_minrowIndex;i<DT_the_table.rows.length;i++){
with(DT_the_table.rows[i].cells[DT_cur_col]){
style.backgroundColor=''; 
style.color=''; } } }
if(DT_cur_row!=null){ 
for(i=0;i<DT_the_table.rows[DT_cur_row].cells.length;i++){
with(DT_the_table.rows[DT_cur_row].cells[i]){
style.backgroundColor=''; style.color=''; } } } 
if(DT_cur_cell!=null){
if(DT_cur_cell.children[0]!=null)
{
DT_cur_cell.children[0].contentEditable = false; 

with(DT_cur_cell.children[0].runtimeStyle)
{
borderLeft=borderTop='';
borderRight=borderBottom=''; 
backgroundColor=''; 
paddingLeft='';
textAlign=''; 
}
}
}}
function DT_Listfun_EditReCheckBox(strTFvalue,i,ii)
{
var strtmpv=strTFvalue.split('$$');
var obj=new Object();

obj=eval('document.all.ch_' + i.toString() + '_' + ii.toString());

if(obj.checked==true)
{
eval('document.all.DT_Edit_CBTEXT_' + i.toString() + '_' + ii.toString() + '.innerText=\"' + strtmpv[0] + '\"');
}
else
{
eval('document.all.DT_Edit_CBTEXT_' + i.toString() + '_' + ii.toString() + '.innerText=\"' + strtmpv[1] + '\"');

}
}
function LTrim(str)

{

    var whitespace = new String(" \t\n\r");

    var s = new String(str);

    

    if (whitespace.indexOf(s.charAt(0)) != -1)

    {

        var j=0, i = s.length;

        while (j < i && whitespace.indexOf(s.charAt(j)) != -1)

        {

            j++;

        }

        s = s.substring(j, i);

    }

    return s;

}



function RTrim(str)

{

    var whitespace = new String(" \t\n\r");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -