JavaScript DataView.getUint32() 方法

2025年3月18日 | 2 分钟阅读

JavaScript DataView.getUint32() 是 dataView 中内置的方法。它用于获取指定位置的无符号 32 位整数(无符号长整型)数字。

语法

参数

byteoffset:从视图开始处读取数据的字节偏移量。

返回值

此方法返回一个无符号 32 位整数数字。

浏览器支持

Chrome9
Safari5.1
火狐15
Opera12.1

示例 1

输出

Convert the value 234.2 to:

234

示例 2

输出

If there is no data to be stored, then Output will Be:

0

示例 3

输出

Convert the PI value 3.14 to:

3

示例 4

输出

If we give an Integer value then Output will be Integer

123