var ifr = document.getElementById('contentEdit');
ifr.contentWindow.focus();
_window = window.frames['contentEdit'];
_window.document.body.focus();
上面两种方法都可以
var ifr = document.getElementById('contentEdit');
ifr.contentWindow.focus();
_window = window.frames['contentEdit'];
_window.document.body.focus();
上面两种方法都可以
转载于:https://my.oschina.net/122612475/blog/287682