// output <TD> for each column in row
var nCols = this.colData.length;
for (var nCol=0; nCol < nCols; nCol++)
{
// apply column attributes to <TD>
if (nCol < this.colAttributes.length)
// act.asp用于对文件进行重定向并进行一定的设置,
// path是所要导向的文件路径,后加myfile、是对文件路径进行简单的保密和错乱,在使用时要定义其文件名称,比如:
// dim dirfilename
// dirfilename="a.asp" ''或者 dirfilename="filename/a.asp"
// id中加入'520'字串是为了对absolutePosition进行一定的保密
strHTML += '<TD ' + hilite + ' ' + this.colAttributes[nCol] + '><a href="../act.asp?path=myfile' + dirfilename + '&id=520' + this._objDataSource.absolutePosition + '">';
else
strHTML += '<TD><a href="#">';
// determine format per data column
if (typeof(this.colFormat[nCol]) != 'undefined')
{ // use column format
strHTML += this.colFormat[nCol];
}
else if (this.rowFormat.length)
{ // use row format
var nRow = this._rowCount % this.rowFormat.length;
strHTML += this.rowFormat[nRow];
}
<SCRIPT RUNAT=SERVER LANGUAGE="JavaScript">
// ************************************************************************
// MSL : Microsoft Scripting Libary
// Visual InterDev 6.0 DataGrid Object for ASP
// Copyright 1998 Microsoft Corporation. All Rights Reserved.
// Modify by MYLiao 2003-10-12
// ************************************************************************
function CreateDataGrid(strName,funcInit,objParent)
{
if (typeof(strName) == 'string' && strName != '')
{
var objDataGrid = new _DataGrid(strName,objParent);
eval(strName + ' = objDataGrid');