NDEFWriter

草案
此页面不完整。

Secure context
This feature is available only in secure contexts (HTTPS), in some or all supporting browsers .

这是 实验性技术
检查 浏览器兼容性表格 在生产中使用这之前。

NDEFWriter interface of the Web NFC API is an abstract interface used to write data to compatible NFC devices, e.g. NFC tags supporting NDEF, when these devices are within the reader's magnetic induction field.

构造函数

NDEFWriter.NDEFWriter()
Returns an NDEFWriter .

方法

NDEFWriter.write()
Called to write NDEF message to a tag (after ensuring hardware and UA compatibility and obtaining permission from the user) or get an error explaining why feature is not available.

规范

规范 状态 Comment
Web NFC, NDEFReader 草案 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
NDEFWriter
Chrome No Edge No Firefox No IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
NDEFWriter() 构造函数
Chrome No Edge No Firefox No IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
Secure context required Chrome No Edge No Firefox No IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No
write
Chrome No Edge No Firefox No IE No Opera No Safari No WebView Android No Chrome Android No Firefox Android No Opera Android No Safari iOS No Samsung Internet Android No

图例

不支持
不支持
实验。期望将来行为有所改变。
实验。期望将来行为有所改变。
  1. NDEFWriter