--- title: getBigInt64() slug: Web/JavaScript/Reference/Global_Objects/DataView/getBigInt64 tags: - DataView - JavaScript - Prototype - getBigInt64() - 大整型 translation_of: Web/JavaScript/Reference/Global_Objects/DataView/getBigInt64 ---
getBigInt64()
方法从 {{jsxref("DataView")}}开始获取一个指定偏移量的有符号64位整数 (long long) 。
dataview.getBigInt64(byteOffset [, littleEndian])
false
或 undefined
, 则按大端方式读取数据。一个 {{jsxref("BigInt")}}.
byteOffset
设置的偏移量超出了视图的范围,则抛出该异常。getBigInt64
方法var buffer = new ArrayBuffer(8); var dataview = new DataView(buffer); dataview.getBigInt64(0); // 0n
规范版本 | 规范状态 | 注解 |
---|---|---|
DataView.prototype.getBigInt64 proposal |
{{Compat("javascript.builtins.DataView.getBigInt64")}}