1 average score for each person (only one score for repeated replies ):
Javascript: var t = function (tag, s) {return (s | document ). getElementsByTagName (tag) ;}; var n = function (name) {return document. getElementsByName (name)}; var total = t ("var") [0]. innerHTML-0; var scores = n ("tb_score"); var lz = t ("a", t ("var") [0]. parentNode) [0]. innerHTML; var c ={}; c [lz] = lz; for (var I = 0; I <scores. length; I ++) {var v = t ("a", scores [I]. parentNode) [0]. innerHTML; if (! C [v]) {c [v] = v; scores [I]. value = scores [I]. value-0 + 1; total --; if (total = 0) break;} if (I = scores. length-1) {I =-1; c = {}; c [lz] = lz ;}}; alert ("OK"); void (0)
Source code:
Copy codeThe Code is as follows:
Var t = function (tag, s) {return (s | document). getElementsByTagName (tag );};
Var n = function (name) {return document. getElementsByName (name )};
Var total = t ("var") [0]. innerHTML-0;
Var scores = n ("tb_score ");
Var lz = t ("a", t ("var") [0]. parentNode) [0]. innerHTML;
Var c = {};
C [lz] = lz;
For (var I = 0; I <scores. length; I ++ ){
Var v = t ("a", scores [I]. parentNode) [0]. innerHTML;
If (! C [v]) {
C [v] = v;
Scores [I]. value = scores [I]. value-0 + 1;
Total --;
If (total = 0) break;
}
If (I = scores. length-1) {I =-1; c = {}; c [lz] = lz ;}
};
Alert ("OK ");
2 average score per floor:
Javascript: var t = function (tag, s) {return (s | document ). getElementsByTagName (tag) ;}; var n = function (name) {return document. getElementsByName (name)}; var total = t ("var") [0]. innerHTML-0; var scores = n ("tb_score"); var lz = t ("a", t ("var") [0]. parentNode) [0]. innerHTML; for (var I = 0; I <scores. length; I ++) {if (t ("a", scores [I]. parentNode) [0]. innerHTML! = Lz) {scores [I]. value = scores [I]. value-0 + 1; total --; if (total = 0) break;} if (I = scores. length-1) I =-1 ;}; alert ("OK"); void (0)
Source code:
Copy codeThe Code is as follows:
Var t = function (tag, s) {return (s | document). getElementsByTagName (tag );};
Var n = function (name) {return document. getElementsByName (name )};
Var total = t ("var") [0]. innerHTML-0;
Var scores = n ("tb_score ");
Var lz = t ("a", t ("var") [0]. parentNode) [0]. innerHTML;
For (var I = 0; I <scores. length; I ++ ){
If (t ("a", scores [I]. parentNode) [0]. innerHTML! = Lz ){
Scores [I]. value = scores [I]. value-0 + 1;
Total --;
If (total = 0) break;
}
If (I = scores. length-1) I =-1;
};
Alert ("OK ");
Note: Put the above Code in the address bar of the finishing page and press Enter. It is only used once. Otherwise, a negative score will occur.