window屬性:onmessage

2018-05-14 11:38 更新

onmessage屬性

使用此功能之前,請仔細(xì)查看瀏覽器兼容性表。

WindowEventHandlers的onmessage屬性是當(dāng)對象接收消息事件時(shí)調(diào)用的EventHandler。

onmessage屬性語法

window.addEventListener('message',function(event){...})
window.onmessage = function(event){...}

規(guī)范

規(guī)范 狀態(tài) 注釋
HTML Living Standard
規(guī)范中'onmessage'的定義。
Living Standard
初始定義。

瀏覽器兼容性

電腦端 移動端
Chrome
Edge
Firefox
Internet Explorer
Opera
Safari
Androidwebview
Chrome for Android
Edge Mobile Firefox for Android
Opera for Android
iOS Safari
基本支持 支持:60 ? ? ? 支持:47 支持:60 支持:60 ? ? 支持:47 ?
以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號