Chmod calculator |
/* Bandwidth calculator (credit must stay enclosed) By javascriptkit.com For this and over 400+ JavaScripts, Visit http://www.javascriptkit.com */ var bytevalue=0 function calculate(){ var invalue=document.bandwidth.original.value var selectunit=document.bandwidth.units.options[document.bandwidth.units.selectedIndex].value if (selectunit=="Bytes") bytevalue=invalue else if (selectunit=="Kb") bytevalue=invalue*1024 else if (selectunit=="Mb") bytevalue=invalue*1024*1024 else if (selectunit=="Gb") bytevalue=invalue*1024*1024*1024 alert (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") }
|
//MPS to MPH converter script //Visit http://javascriptkit.com for this script //calculate function function calc(){ //variables var meterspersecond = document.converter.mps.value var calculated = Math.round(meterspersecond * 3600 / 1610.3*1000)/1000 //write in text box document.converter.mph.value=calculated } |