在Java Script中查找对象大小 [英] Finding object size in Java Script

查看:101
本文介绍了在Java Script中查找对象大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



有谁能告诉我如何在javascript中查找对象的大小?



谢谢,

Lijo

解决方案

这里有一个答案: http://stackoverflow.com/questions/1248302/javascript-object-size [ ^ ] - 但它怀疑它对你有什么用处。



问题在于Javascript是一种解释型语言,每个浏览器编写者都以不同的方式实现,并且在一个内存使用几乎无关紧要的世界中运行。绝对不能保证一个对象在两个不同的浏览器中占用相同页面的相同空间,甚至不能保证同一个浏览器的两个不同版本 - 它不是任何术语定义的有用指标! / BLOCKQUOTE>

Hi All,

Can anyone please tell me how to find out the size of an object in javascript?

Thanks,
Lijo

解决方案

There is an answer here: http://stackoverflow.com/questions/1248302/javascript-object-size[^] - but it doubt it will be of any real use to you.

The problem is that Javascript is an interpreted language, which is implemented differently by each of the browser writers, and which runs in a world where memory usage is pretty much irrelevant. There is absolutely no guarantee that an object will take up the same amount of space for the same page in two different browsers, or even two different versions of the same browser - it isn''t a useful metric by any definition of the term!


这篇关于在Java Script中查找对象大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆