1 35
1.1 10
1.2 10
1.3 10
1.3.1 5
1.3.2 5
1.4 5
2 30
2.1 10
2.2 20
Total: 65
----------------------------------------------------
// Initialize the parent Self-Rating
Function setfathernum ()
{
VaR objtable = Document. getelementbyid ("dgrdlist ");
// Divide the parent-level self-evaluation into 0 Points
For (VAR I = objtable. Rows. Length-2; I> 0; I --)
{
VaR stritemnum1 = objtable. Rows [I]. cells [1]. innertext;
VaR arrayitemnum = stritemnum1.split (".");
VaR arraycount = arrayitemnum. length;
If (arraycount> 1)
{
VaR itemnum = "";
For (VAR n = 0; n <= arrayCount-2; n ++)
{
Itemnum + = "." + arrayitemnum [N];
}
Itemnum = itemnum. substring (1, itemnum. Length );
For (var j = objtable. Rows. Length-2; j> 0; j --)
{
VaR idsum1 = parsefloat (j) + parsefloat (1 );
VaR zptextid1 = "dgrdlist _ CTL" + idsum1 + "_ selfappraisenum ";
VaR stritemnum2 = objtable. Rows [J]. cells [1]. innertext;
If (stritemnum2 = itemnum)
{
Document. getelementbyid (zptextid1). value = 0;
}
}
}
}
}
// Cascading scoring
Function felatingsum ()
{
VaR objtable = Document. getelementbyid ("dgrdlist ");
// Divide the parent-level self-evaluation into 0 Points
Setfathernum ();
// Calculate the parent-level self-Score Based on the sub-level self-Score
For (VAR I = objtable. Rows. Length-2; I> 0; I --)
{
VaR stritemnum1 = objtable. Rows [I]. cells [1]. innertext;
VaR arrayitemnum = stritemnum1.split (".");
VaR arraycount = arrayitemnum. length;
If (arraycount> 1)
{
VaR itemnum = "";
For (VAR n = 0; n <= arrayCount-2; n ++)
{
Itemnum + = "." + arrayitemnum [N];
}
Itemnum = itemnum. substring (1, itemnum. Length );
For (var j = objtable. Rows. Length-2; j> 0; j --)
{
VaR idsum1 = parsefloat (j) + parsefloat (1 );
VaR idsum2 = parsefloat (I) + parsefloat (1 );
VaR zptextid1 = "dgrdlist _ CTL" + idsum1 + "_ selfappraisenum ";
VaR zptextid2 = "dgrdlist _ CTL" + idsum2 + "_ selfappraisenum ";
VaR stritemnum2 = objtable. Rows [J]. cells [1]. innertext;
If (stritemnum2 = itemnum)
{
Document. getelementbyid (zptextid1). value = parsefloat (document. getelementbyid (zptextid1). Value) + parsefloat (document. getelementbyid (zptextid2). value );
}
}
}
}
// Total statistics
Statsum ();
}
// Total statistics
Function statsum ()
{
VaR objtable = Document. getelementbyid ("dgrdlist ");
VaR countsum = 0;
VaR standardsum = 0;
// Calculate the parent-level self-Score Based on the sub-level self-Score
For (VAR I = objtable. Rows. Length-2; I> 0; I --)
{
VaR stritemnum1 = objtable. Rows [I]. cells [1]. innertext;
VaR arrayitemnum = stritemnum1.split (".");
VaR arraycount = arrayitemnum. length;
VaR idsum1 = parsefloat (I) + parsefloat (1 );
VaR zptextid1 = "dgrdlist _ CTL" + idsum1 + "_ selfappraisenum ";
If (arraycount = 1)
{
Countsum = parsefloat (countsum) + parsefloat (document. getelementbyid (zptextid1). value );
Standardsum = parsefloat (standardsum) + parsefloat (objtable. Rows [I]. cells [4]. innertext );
}
}
Objtable. Rows [objtable. Rows. Length-1]. cells [6]. innertext = countsum;
Objtable. Rows [objtable. Rows. Length-1]. cells [4]. innertext = standardsum;
}