dateview的高低位

我要冲啦个人网站建设2024-01-19web前端
// 读取

getUint16(byteOffset)

getUint16(byteOffset, littleEndian)

Parameters

byteOffset

The offset, in bytes, from the start of the view to read the data from.

littleEndian Optional

Indicates whether the data is stored in little- or big-endian format. If false or undefined, a big-endian value is read.

// 指示数据是以小端还是大端格式存储。如果为false或未定义,则读取一个大端序值。
 

// 设置

setUint16(byteOffset, value)

setUint16(byteOffset, value, littleEndian)

Parameters

byteOffset

The offset, in bytes, from the start of the view to store the data in.

value

The value to set. For how the value is encoded in bytes, see Value encoding and normalization.

littleEndian Optional

Indicates whether the data is stored in little- or big-endian format. If false or undefined, a big-endian value is written.

// 指示数据是以小端还是大端格式存储。如果为false或未定义,则会写入一个大端值。

文章关键词