[转载]UEditor报错TypeError: me.body is undefined
生活随笔
收集整理的這篇文章主要介紹了
[转载]UEditor报错TypeError: me.body is undefined
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
本文轉載來自: UEditor報錯TypeError: me.body is undefined
?
今天在使用UEditor的setContent的時候報錯,報錯代碼如下 TypeError: me.body is undefined 或 Uncaught TypeError: Cannot set property 'innerHTML' of undefined 錯誤的原因是沒有等UEditor創建完成就使用UEditor的setContent函數了,可以通過如下代碼解決 方法一:
ueditor.addListener("ready", function () {ueditor.setContent('UEditor報錯TypeError: me.body is undefined'); });?
方法二:
ueditor.ready(function() {ueditor.setContent('UEditor報錯TypeError: me.body is undefined'); });?
轉載于:https://www.cnblogs.com/towerking/p/4581331.html
總結
以上是生活随笔為你收集整理的[转载]UEditor报错TypeError: me.body is undefined的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: OC2_点语法(属性关键字)
- 下一篇: 序列化与反序列化(记住密码)