var xhr = $.ajax({ type: "HEAD", url: "path/to/file.ext", success: function(msg){ alert(xhr.getResponseHeader('Content-Length') + ' bytes'); } });
Ajax获取响应内容长度的方法
转载
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章