Cricket Average Calculator script that helps you to calculate the amount of runs, number of times dismissed and the amount of wickets taken.
Features
Simple and efficient calculator for calculating the cricket average.
Good tool for the cricket players to calculate their runs, wickets takes and times dismissed.
Just copy the code into your page and use it.
Preview
Downloads
Javascript
<!-- Script by hscripts.com -->
<script type="text/JavaScript"> function batave() {if(!document.form.ave1.value == "" && !document.form.runs1.value == "" && !document.form.dis1.value == "" ) { alert("Enter only two fields and leave the third one empty"); } else{ if (document.form.ave1.value == "") document.form.ave1.value = document.form.runs1.value/document.form.dis1.value if (document.form.runs1.value == "") document.form.runs1.value = document.form.ave1.value*document.form.dis1.value if (document.form.dis1.value == "") document.form.dis1.value = document.form.runs1.value/document.form.ave1.value} } function bowlave() {if(!document.form.ave2.value == "" && !document.form.hit1.value == "" && !document.form.wick1.value == "" ) { alert("Enter only two fields and leave the third one empty"); }else { if (document.form.ave2.value == "") document.form.ave2.value = document.form.hit1.value/document.form.wick1.value if (document.form.hit1.value == "") document.form.hit1.value = document.form.ave2.value*document.form.wick1.value if (document.form.wick1.value == "") document.form.wick1.value = document.form.hit1.value*document.form.ave2.value } } function clearbat() { document.form.ave1.value = "" document.form.runs1.value = "" document.form.dis1.value = "" } function clearbowl() { document.form.ave2.value = "" document.form.wick1.value = "" document.form.hit1.value = "" } function isNumberKey(evt){var charCode = (evt.which) ? evt.which : event.keyCodeif (charCode > 31 && (charCode < 48 || charCode > 57)){alert("Enter only numbers");return false;}return true;} function ctck() { var sds = document.getElementById("dum"); if(sds == null){alert("You are using a free package.\n You are not allowed to remove the tag.\n");} var sdss = document.getElementById("dumdiv"); if(sdss == null){alert("You are using a free package.\n You are not allowed to remove the tag.\n");} } document.onLoad=ctck(); </script>