Friday, May 26, 2017

t-score-calculator-by-CCL.html

<!doctype html>



<h2>Pseudo-PSLE t-score Calculator</h2>

<form>
EL : <input type="text" id="EL" value="0" /><br />
CL : <input type="text" id="CL" value="0" /><br />
Ma : <input type="text" id="Ma" value="0" /><br />
Sci : <input type="text" id="Sc" value="0" /><br />
</form>

<br />
<input type="button" onclick="calcTscore()" value="Click to calculate t-Score" />
<br />
<h1 id="tscore"></h1>

<form>
________________________<br />
<br />
EL Ave: <input type="text" id="EL_ave" value="66.5" /><br />
CL Ave: <input type="text" id="CL_ave" value="76.4" /><br />
Ma Ave: <input type="text" id="Ma_ave" value="63.8" /><br />
Sci Ave: <input type="text" id="Sc_ave" value="78.0" /><br />
<br />
EL SD: <input type="text" id="EL_sd" value="10.8" /><br />
CL SD: <input type="text" id="CL_sd" value="13.1" /><br />
Ma SD: <input type="text" id="Ma_sd" value="22.5" /><br />
Sci SD: <input type="text" id="Sc_sd" value="21.0" /><br />
________________________<br />
</form>

<script type"text/javascript">
function calcTscore()
{
var a1=parseFloat(document.getElementById("EL").value);
var a2=parseFloat(document.getElementById("CL").value);
var a3=parseFloat(document.getElementById("Ma").value);
var a4=parseFloat(document.getElementById("Sc").value);

var b1=parseFloat(document.getElementById("EL_ave").value);
var b2=parseFloat(document.getElementById("CL_ave").value);
var b3=parseFloat(document.getElementById("Ma_ave").value);
var b4=parseFloat(document.getElementById("Sc_ave").value);

var c1=parseFloat(document.getElementById("EL_sd").value);
var c2=parseFloat(document.getElementById("CL_sd").value);
var c3=parseFloat(document.getElementById("Ma_sd").value);
var c4=parseFloat(document.getElementById("Sc_sd").value);

var ts= Math.round(10* (200 + 10*( (a1-b1)/c1 + (a2-b2)/c2 + (a3-b3)/c3 + (a4-b4)/c4) ) )/10;
document.getElementById("tscore").innerHTML = ts;
}
</script>



</!doctype>Open the attachment from a browser

No comments:

Post a Comment