FF下这个方法吗?execCommand("Bold",false,null);
FF下是不支持innerText的
FF下是不支持innerText的
解决方案 »
- json递归问题
- <td onselectstart="javascript:selection.empty();"><input type="text" /></td>怎么使input的选择保持有效?
- 表单提交的问题....很奇怪,请指点一二
- javascript如何制作收藏
- document.referrer 怎么判断上一页来源?
- IFRAME里面的内容怎么取?里面的内容是document.write进去的~
- 弹出窗口处理问题
- 页面上有一个小图片a,一个大图片b,想让a以b左上角为坐标定位. 看看这段代码为什么a还是以页面坐标定位.
- 怎样在一个具有框架的窗口中关闭浏览器?
- 求一个匹配字符串的正则表达式,引号之间的内容。需要匹配多个
- 获得表单的名字 [有点难]
- 如何判断字符为特殊字符
editor.contentWindow.focus();
var Range;
if(ie)
{
Range=editor.contentWindow.document.selection.createRange();
Range.execCommand("bold",false,false);
}
else
{
//Range=editor.contentWindow.document.getSelection ? editor.contentWindow. document.getSelection() : window.getSelection();
editor.contentWindow.document.execCommand("bold",false,false);
}
================================================================================
但是显示HTML到TEXTAREA的还是不能用...
window.document.getElementById('preview').text =window.frames['edit'].document.body.innerHTML;
不知道为什么window.document.getElementById('preview').text赋值会没有效果..