pasteHTML兼容ie,firefox,chrome
来源:互联网 发布:客服网络礼仪规范 编辑:程序博客网 时间:2024/04/30 03:13
<html>
<body>
<script language="JavaScript">
function test() {
if (document.selection && document.selection.createRange) {
var myRange = document.selection.createRange();
var m = myRange.pasteHTML('<iframe width=100 height=100 src="http://localhost/t2.htm"></iframe>');
}
else if (window.getSelection) {
var selection = window.getSelection();
var range = window.getSelection().getRangeAt(0);
range.deleteContents();
var newP = document.createElement('iframe');
newP.src="http://localhost/t2.htm";
newP.width="100";
newP.height="100";
range.insertNode(newP);
}
}
</script>
<p>Highlight a part of this text, then click button below</p>
<input id="myB" type="button" value="Click me" onclick="test();">
</body>
</html>
- pasteHTML兼容ie,firefox,chrome
- pasteHTML兼容ie,firefox,chrome等浏览器
- FLASH兼容IE FireFox Chrome
- event 兼容调用(IE,Firefox,Chrome)
- js操作select 兼容ie、chrome、Firefox
- 回到顶部代码,兼容IE CHROME FIREFOX
- 兼容IE-FireFox-Chrome的背景音乐播放
- 兼容IE-FireFox-Chrome的背景音乐播放
- javascript解析xml文件。兼容IE、firefox、Chrome
- 兼容ie,firefox,chrome的跨域加载js脚本
- JavaScript无提示关闭窗口(兼容IE/Firefox/Chrome)
- js动态添加、删除表格,兼容IE、FireFox、Chrome
- 兼容firefox、chrome、ie的wmp网页播放器代码
- js+flash 剪切板复制粘贴 兼容ie chrome firefox flash10
- js获取上传文件大小,兼容ie,FireFox,Chrome
- 兼容IE,FireFox,Chrome主流的文字阴影功能。
- Extjs 限制 textfield / textarea 输入字数 , 兼容 IE Firefox Chrome
- 兼容IE、FireFox、Chrome等浏览器的xml处理函数
- web系统速度优化细节
- WinRAR压缩加密
- Linux日志学习
- ubuntu下升级到4.1在eclipse中新建android application project向导无法finish的解决方法
- <<探讨linux/unix>>之创建文件
- pasteHTML兼容ie,firefox,chrome
- 学习重在思考
- 字库芯片学习之汉字内码
- net-snmp中载入第三方mib库
- OpenCV 2 访问图像像素
- 适配器模式
- 序列化与反序列化
- jquery 里的each使用方法
- java增强语法