这样试试
<iframe name="edit" frameborder="0" height="100" width="200"></iframe><script>
window.frames.edit.document.designMode = 'on';
</script>
<iframe name="edit" frameborder="0" height="100" width="200"></iframe><script>
window.frames.edit.document.designMode = 'on';
</script>
解决方案 »
- showModalDialog关闭问题
- 请高手帮助!图片滚动在IE6和IE7的不同
- ajax,ie7,8下不行,火狐下却可以
- alert(whichIt)和alert(whichIt.parentElement)结果怎么一样呢?怎么回事
- div图层显示问题,不知道难不难
- 各位请进!!弹出窗口问题,如何不让active窗口弹出!!先谢谢了
- 如图 我想在点击checkbox 选中这行的时候删除这一行·怎么在选中后拿到这一行的行号?
- jqgrid点击上(下\第一\最后)一页箭头后,服务器接受那些数据?
- 屏蔽shift+鼠标左键!!!
- 如何创建多维数组?
- Javascript中的$是什么意思?
- 简单使用 document.createElement 和 new Option 创建一个列表框时碰到的灵异事件,胆小者慎入!!!
var editor = document.getElementById("edit").contentWindow;
editor.document.designMode = 'On';
editor.document.contentEditable = true;
editor.document.open();
editor.document.close();
editor.document.body.innerHTML="Test"; </script>
这里有个,可以参考