oglop
2016-04-20 05:16:00 +08:00
```
function doresize(){
var ht = window.innerHeight;
console.log("ht = " + ht);
if (document.getElementsByClassName('mce-toolbar-grp')){
ht += -document.getElementsByClassName('mce-toolbar-grp')[0].offsetHeight;
ht += -document.getElementsByClassName('mce-toolbar-grp')[0].offsetTop;
console.log("ht = " + ht);
}
if (document.getElementsByClassName('mce-statusbar')){
ht += -document.getElementsByClassName('mce-statusbar')[0].offsetHeight;
console.log("ht = " + ht);
}
ht += -3; // magic value that changes depending on your html and body margins
if (document.getElementsByClassName('mce-edit-area')){
document.getElementsByClassName('mce-edit-area')[0].style.height = ht + "px";
console.log("ht = " + ht);
}
}
window.onresize=doresize;
window.onload=doresize;
```
这样可以但是很挫,能用 css 解决么