对uedit 执行命令 setContent 的时候,应该保证编辑器已经初始化话完毕。才可是使用。
否则给出错误提示
Uncaught TypeError: Cannot set property 'innerHTML' of undefined
正确的写法应该是
var ue = UE.getEditor('editor'); var content = '惺惺惜惺惺; var type = '<?php echo $row['type']; ?>'; // ue.setContent(content); 错误的写法 // 正确的写法 ue.ready(function () { ue.setContent(content); });
<a href="http://www.ipbbs.net/viewforum.php?id=4"> jquery教程</a>
离线