--- title: DataView.prototype.getUint32() slug: Web/JavaScript/Reference/Global_Objects/DataView/getUint32 translation_of: Web/JavaScript/Reference/Global_Objects/DataView/getUint32 ---
getUint32()
方法
从
DataView
相对于起始位置偏移 n 个字节处开始,获取一个32-bit数(无符号长整型,4个字节).
dataview.getUint32(byteOffset [, littleEndian])
var buffer = new ArrayBuffer(8); var dataview = new DataView(buffer); dataview.getUint32(1); // 0
Specification | Status | Comment |
---|---|---|
{{SpecName('Typed Array')}} | {{Spec2('Typed Array')}} | Superseded by ECMAScript 6. |
{{SpecName('ES6', '#sec-dataview.prototype.getuint32', 'DataView.prototype.getUint32')}} | {{Spec2('ES6')}} | Initial definition in an ECMA standard. |
{{SpecName('ESDraft', '#sec-dataview.prototype.getuint32', 'DataView.prototype.getUint32')}} | {{Spec2('ESDraft')}} |
{{Compat("javascript.builtins.DataView.getUint32")}}