How to use jquery to create progress bar for loading an image?

别等时光非礼了梦想. 提交于 2019-12-12 01:18:52

问题


I want to take size in bytes of image in page at the first load page, and then create a loading bar and show it loading similar preloader of flash. But I don't know if jQuery can take size in bytes of image or not.


回答1:


I think all of these answers require something server-side to determine the file-size (please correct me if I'm wrong), but it would probably be best to preload the size from server-size or do an AJAX request to determine the file-size, but the latter seems counter productive.



来源:https://stackoverflow.com/questions/3098489/how-to-use-jquery-to-create-progress-bar-for-loading-an-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!