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

📄 dtable

📁 利用ASP.NET技术完成个人网站的设计
💻
📖 第 1 页 / 共 5 页
字号:
tmpstr=DT_Main_Tab.rows[i].cells[cellIndex].innerHTML;
}
else if(type=='old')
{
tmpstr=DT_TableText[i][cellIndex].toString();
}
else
{
tmpstr=DT_TableText[i][cellIndex].toString();

}
var tmpNL=getLength(tmpstr);
if(tmpNL>tmpwidth)
{
tmpwidth=tmpNL
}
}
return tmpwidth ;
}

function DT_setCellText(cellIndex,N)
{

for(var i=DTable_minrowIndex-1;i<DT_Main_Tab.rows.length;i++){
var tmpstr=DT_TableText[i][cellIndex].toString();
if(tmpstr=='')
{
return false;
}
var tmpNL=getNstring(tmpstr,N);
DT_Main_Tab.rows[i].cells[cellIndex].innerText=tmpNL;
}
}



function UpBody()
{
var tmpcx=window.event.x + window.document.body.scrollLeft;

if( DT_resize_CurState==true )
{
var cellindex=replace(DT_resize_CurId.id.toString(),'DTableTitle','');
var maxLength;
if(DT_resize_nowX>(tmpcx-3) && DT_resize_nowX<(tmpcx+3))
{
maxLength=getCellWidth(cellindex,'old');

DT_resize_CurId.width =maxLength * (DT_fontSize/2) + 1 ;
//+ 5 +  DT_Main_Tab.cellPadding
DT_thisTable.width=DT_thisTable.offsetWidth  + (DT_resize_CurId.offsetWidth-DT_resize_oldcellwidth) ;
DT_resize_CurId.innertext=DT_resize_CurId.width ;
DT_setCellText(cellindex,maxLength);
}
else
{
maxLength=getCellWidth(cellindex,'now');

DT_resize_OldPlace=window.event.x + window.document.body.scrollLeft ;
DT_resize_oldcellwidth=DT_resize_CurId.offsetWidth;
DT_resize_oldtablewidth=DT_thisTable.offsetWidth;



}
DT_resize_CurState=false ;
DT_resize_CurDown=false ;
window.document.body.style.cursor="Default" ;

}
DT_sort_col=null;
}
function DT_resize_DownBody()
{
if (DT_resize_CurState==true)
{
DT_resize_CurDown=true ;
DT_resize_isre=true;
DT_resize_OldPlace=window.event.x + window.document.body.scrollLeft ;
DT_resize_oldcellwidth=DT_resize_CurId.offsetWidth;
DT_resize_oldtablewidth=DT_thisTable.offsetWidth;

}
}

function DT_resize_MoveBody()
{



if( DT_resize_CurDown==true )
{
var cellindex=replace(DT_resize_CurId.id.toString(),'DTableTitle','');
var maxLength=getCellWidth(cellindex,'now') - DT_Main_Tab.cellPadding;

window.document.body.style.cursor="e-resize" ;
DT_resize_NewPlace=window.event.x + window.document.body.scrollLeft ;
var tmpcidw=window.event.x - DT_resize_CurId.offsetLeft;
if(tmpcidw>4)
{
var strN=parseInt(tmpcidw/(DT_fontSize/2)-1);
DT_setCellText(cellindex,strN);

DT_resize_CurId.width =tmpcidw ;
DT_resize_CurId.innertext=DT_resize_CurId.offsetWidth ;
DT_thisTable.width=DT_resize_oldtablewidth  + (( DT_resize_NewPlace - DT_resize_OldPlace));


DT_sort_col=null;
}
else
{
return false;
}

}

}

function SelectBody() 
{
if (DT_resize_CurDown==true)
{
window.event.returnValue=false ;

}
}

function document.onmousedown()
{
DT_resize_DownBody();
}
function document.onselectstart()
{
SelectBody();
}


var DT_Main_Tab = null; 
var DT_cur_row = null; 
var DT_cur_col = null; 
var DT_cur_cell = null;
var DT_Org_con = ''; 
var DT_sort_col = null;
var DT_show_col = false;
var DT_charMode = true;
var DT_act_fc = ''; 
var DT_cur_bgc = '#ccffcc'; 
var DT_cur_fc = ''; 



function DT_Listfun_initValue(firstrow)
{
if(parseInt(firstrow)==DTable_minrowIndex-1)
{
DT_TableText =new Array(DT_Main_Tab.rows.length);
}

try
	{
for(i=firstrow;i<DT_Main_Tab.rows.length;i++)
{
if(parseInt(firstrow)==DTable_minrowIndex-1)
{

DT_TableText[i]=new Array(DT_Main_Tab.rows.length);
}

for(ii=0;ii<DT_Main_Tab.rows[DT_Main_Tab.rows.length-1].cells.length;ii++)
{



var strsev=new String();
var ishavecellvalue=true;

try
{
strsev=DT_Main_Tab.rows[i].cells[ii].cellText.toString();
}
catch(e)
{
ishavecellvalue=false;
}

if(ishavecellvalue==false)
{
if(i==0)
{
	
strsev=DT_Main_Tab.rows[i].cells[ii].innerHTML.toString();
	


}
else
{
strsev=DT_Main_Tab.rows[i].cells[ii].innerText.toString();

}
}
strsev=Trim(strsev);
DT_Main_Tab.rows[i].cells[ii].cellText=strsev;
DT_TableText[i][ii]=strsev;

}//end for ii
}//end for i
	}//end try
	catch(e)
	{}

DT_arrowUp = document.createElement('SPAN'); 
DT_arrowUp.innerHTML = '5'; 
DT_arrowDown = document.createElement('SPAN');
DT_arrowDown.innerHTML = '6';
DT_arrowUp.style.cssText =DT_SortUpText;
DT_arrowDown.style.cssText =DT_SortDownText;
}



function DT_Listfun_init()
{
DT_cur_row = null; DT_cur_col = null;
DT_cur_cell = null; 
DT_sort_col = null; 
DT_Main_Tab = DT_thisTable;
DT_read_def(DT_Main_Tab);
DT_Main_Tab.onclick = DT_Listfun_clickIt;

DT_fontSize=DT_Main_Tab.style.fontSize;
if(DT_fontSize.length<1)
{
DT_fontSize=9;
}
DT_Org_con = DT_Main_Tab.outerHTML;
DT_arrowUp = document.createElement('SPAN'); 
DT_arrowUp.innerHTML = '5'; 
DT_arrowDown = document.createElement('SPAN');
DT_arrowDown.innerHTML = '6';
DT_arrowUp.style.cssText =DT_SortUpText;
DT_arrowDown.style.cssText =DT_SortDownText;

EnableDragCell_init=EnableDragCell;
EnableSort_init=EnableSort;
EnableAdjustCellWidth_init=EnableAdjustCellWidth;



DT_Listfun_initValue(DTable_minrowIndex-1);
for(i=0;i<DT_Main_Tab.rows.length;i++)
{
try
{
for(ii=0;ii<DT_Main_Tab.rows[DTable_minrowIndex-1].cells.length;ii++)
{
if(i==(DTable_minrowIndex-1) && ii>0)
{
DT_Main_Tab.rows[i].cells[ii].id='DTableTitle' + ii;
DT_Main_Tab.rows[i].cells[ii].onmousemove=function (){DT_resize_MoveCol(this)};


}


if(DT_Main_Tab.rows[i].cells[ii]!=null)
{
DT_Main_Tab.rows[i].cells[ii].className='DT_List_CellStyle';
}
}
}
catch(e)
{
alert(e+ 'i:' + i + ' ii:' + ii);
}
}
}



function document.onclick(){


if(document.getElementById('VicPopCal'))
	{
	DT_fHideCalendar();
	}



var obj = event.srcElement;

if(document.getElementById('dtablejsqc'))
	{
	
	while(obj!=null && typeof(obj.tagName) != 'undefind')
		{

⌨️ 快捷键说明

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