function byte_ausrechnen(bytes){ size=0; if(bytes >= 1024 && bytes < Math.pow(1024, 2)){ size = Math.round(bytes/1024, 2)+' KByte'; } else if(bytes >= Math.pow(1024, 2) && bytes < Math.pow(1024, 3)){ size = Math.round(bytes/Math.pow(1024, 2), 2)+' MByte'; } else if(bytes >= Math.pow(1024, 3) && bytes < Math.pow(1024, 4)){ size = Math.round(bytes/Math.pow(1024, 3), 2)+' GByte'; } else if(bytes >= Math.pow(1024, 4) && bytes < Math.pow(1024, 5)){ size = Math.round(bytes/Math.pow(1024, 4), 2)+' TByte'; } else if(bytes >= Math.pow(1024, 5) && bytes < Math.pow(1024, 6)){ size = Math.round(bytes/Math.pow(1024, 5), 2)+' PByte'; } else if(bytes >= Math.pow(1024, 6) && bytes < Math.pow(1024, 7)){ size = Math.round(bytes/Math.pow(1024, 6), 2)+' EByte'; } else { size = bytes+' Byte'; } return size; } size = byte_ausrechnen(Bytes);
| 14.12.2023