JavaScript 中的 TypedArray.byteLength 属性
htmljavascriptprogramming scripts更新于 2024/10/19 5:00:17
TypedArray 对象的 byteLength 属性表示其 TypedArray 的长度(以字节为单位)。
语法
其语法如下
typedArray.byteLength();
示例
<html> <head> <title>JavaScript 示例</title> </head> <body> <script type="text/javascript"> var buffer = new ArrayBuffer(156); var float32 = new Float32Array(buffer); document.write(float32.byteLength); </script> </body> </html>
输出
156
相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

