Home > front end >  UEditor to get focus problem
UEditor to get focus problem

Time:10-18

Work today use UEditor, judge when there is a popup window, click the back focus, how to get back?

CodePudding user response:

The function addSystemAnnouncement () {
Utils. InitDialog ({
Title: 'add system announcement,
Width: 800,
Height: 500,
Operate: [
{
Title: 'add',
Validate: true,
Handler: function (dId, dbody) {
Var params=utils. InitRequestParam (dbody, 'add');
Utils. Ueditor. Init (' XWLM_FIELD ', function (ue) {
Var content=ue. GetContent ();
If (content) {
Params [' XWLM_FIELD]=content;
Utils. Ajax ({
Url: '/portlets/addSystemAnnouncement. Do,
Data: params,
The callback function (data) {
If (data. Success) {
Utils. Alert (" add system announcement success!" , the function () {
The function clearmyedit () {
//ue. SetContent (");
Ue. ExecCommand (' cleardoc ');
Document. The getElementById (" t "). The value="";
}
//portlet render ();
Utils. CloseDialog (dId);
Clearmyedit ();
});
} else {
Utils. Alert (" add announcement system function failure!" );
}
}
});
} else {
Utils. WarnAlert (' please fill out the announcement! ');
Ue. The focus ();
//the document. The getElementById (' XWLM_FIELD). The focus ();
}
});
}
}
],
Body: '& lt; Div data - table="TB_YW_MHXWLM" & gt; + '
'& lt; Dl>
+ '
'& lt; Dl>
+ '
'& lt;/div> '
{} function (dbody)
Utils. Ueditor. Init (' XWLM_FIELD ');
});
}

CodePudding user response:

Ue. Focus (true);
  • Related