[点晴永久免费OA]百度ueditor如何监听获得焦点事件和失去焦点事件
|
admin
2023年7月22日 2:3
本文热度 1364
|
百度ueditor如何监听获得焦点事件和失去焦点事件?
这两个在使用UE时比较常用,用法很简单:
1、ueditor监听获得焦点事件:
UE.getEditor('editor').addListener('focus',function(editor){layer.msg('hi');});
2、ueditor监听失去焦点事件:
UE.getEditor('editor').addListener('blur',function(editor){layer.msg('hi');});
即,只要把focus换成blur即可。
效果:

该文章在 2023/7/22 2:03:42 编辑过