Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

DataView.prototype

DataView.prototype 是DataView 对象的原型

DataView.prototype 属性的属性特性:
writable false
enumerable false
configurable false

描述

DataView 的实例从DataView.prototype继承。就像所有的构造器,你可以修改原型来改变生成的DataView实例。

属性

DataView.prototype.constructor
Specifies the function that creates an object's prototype. The initial value is the standard built-in DataView constructor.
DataView.prototype.buffer 只读
The ArrayBuffer referenced by this view. Fixed at construction time and thus read only.
DataView.prototype.byteLength 只读
The length (in bytes) of this view from the start of its ArrayBuffer. Fixed at construction time and thus read only.
DataView.prototype.byteOffset 只读
The offset (in bytes) of this view from the start of its ArrayBuffer. Fixed at construction time and thus read only.

方法

DataView.prototype.getInt8()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处获取一个8-bit数(一个字节).
DataView.prototype.getUint8()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处获取一个8-bit数(无符号字节).
DataView.prototype.getInt16()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处获取一个16-bit数(短整型).
DataView.prototype.getUint16()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处获取一个16-bit数(无符号短整型).
DataView.prototype.getInt32()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处获取一个32-bit数(长整型).
DataView.prototype.getUint32()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处获取一个32-bit数(无符号长整型).
DataView.prototype.getFloat32()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处获取一个32-bit数(浮点型).
DataView.prototype.getFloat64()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处获取一个64-bit数(双精度浮点型).

DataView.prototype.setInt8()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处储存一个8-bit数(一个字节).
DataView.prototype.setUint8()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处储存一个8-bit数(无符号字节).
DataView.prototype.setInt16()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处储存一个16-bit数(短整型).
DataView.prototype.setUint16()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处储存一个16-bit数(无符号短整型).
DataView.prototype.setInt32()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处储存一个32-bit数(长整型).
DataView.prototype.setUint32()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处储存一个32-bit数(无符号长整型).
DataView.prototype.setFloat32()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处储存一个32-bit数(浮点型).
DataView.prototype.setFloat64()
DataView起始位置以byte为计数的指定偏移量(byteOffset)处储存一个64-bit数(双精度浮点型).

规范

Specification Status Comment
ECMAScript 2015 (6th Edition, ECMA-262)
DataView.prototype
Standard Initial definition.

浏览器支持

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 9.0 15.0 (15.0) 10 12.1 5.1
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support 4.0 (Yes) 15.0 (15) ? 12.0 4.2

另见

文档标签和贡献者

标签: 
 此页面的贡献者: Taoja, mzhejiayu
 最后编辑者: Taoja,