JavaScript Reference/Javascript Properties/fileSize

Материал из Web эксперт
Перейти к: навигация, поиск

"fileSize" Example

    
<html>
<body>
<img id="myImage" src="yourimage.gif"><br>
<button onclick="alert(myImage.fileSize);">Image Size</button>
</body>
</html>



"fileSize" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |document                        <img>                         |
+----------------+--------------------------------------------------------------+



"fileSize" Syntax and Note

Note:
Read-only property. 
Returns the file size in bytes.
    
Syntax:
    
document.all.imgID.fileSize
document.fileSize