Full version: jsB@nk » Calculation » Equivalent » Bandwidth Calculator
URL: https://www.javascriptbank.com/bandwidth-calculator.html
Confused about the various units used to calculate bandwidth, and their equivalent in another unit? Use this bandwidth calculator code to instantly figure it out!
Full version: jsB@nk » Calculation » Equivalent » Bandwidth Calculator
URL: https://www.javascriptbank.com/bandwidth-calculator.html
<script>var bytevalue=0function calculate(){var invalue=document.bandwidth.original.valuevarselectunit=document.bandwidth.units.options[document.bandwidth.units.selectedIndex].valueif (selectunit=="Bytes")bytevalue=invalueelse if (selectunit=="Kb")bytevalue=invalue*1024else if (selectunit=="Mb")bytevalue=invalue*1024*1024else if (selectunit=="Gb")bytevalue=invalue*1024*1024*1024alert (invalue+" "+selectunit+" is equal to:\n\n- "+bytevalue+" Bytes\n- "+Math.round(bytevalue/1024)+" Kb\n- "+Math.round(bytevalue/1024/1024)+" Mb\n- "+Math.round(bytevalue/1024/1024/1024)+" Gb\n")}</script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<form name="bandwidth"><input type="text" name="original" size="20" value=1024> <select size="1" name="units"> <option value="Bytes">Bytes</option><option value="Kb">Kb</option> <option value="Mb">Mb</option> <option value="Gb">Gb</option> </select> <input type="button" value="Calculate" name="B1" onClick="calculate()"></form><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->