码迷,mamicode.com
首页 > Web开发 > 详细

ie11下,插入框架Html

时间:2014-07-09 20:55:06      阅读:455      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   cti   html   

if(navigator.userAgent.indexOf("MSIE")>0 || (navigator.userAgent.indexOf("Trident") > -1 && navigator.userAgent.indexOf("rv:11") > -1)){
  if(window.getSelection){
    var img = document.createElement("img");
    img.src = ‘http://static.qyer.com/images/ask/temp/ask_append_img.png‘;
    img.className = ‘js_load_pic‘;
    var m = editor.getSelection().getRangeAt(0);
    if(m){
      editor.document.body.appendChild(img);
    }
  }else{
  editor.document.selection.createRange().pasteHTML(‘<img src="http://static.qyer.com/images/ask/temp/ask_append_img.png" class="js_load_pic"/>‘) ;  }
}else{
  editor.document.execCommand("insertHTML", null, ‘<img src="http://static.qyer.com/images/ask/temp/ask_append_img.png" class="js_load_pic"/>‘); 
  //插入HTML }

 

ie11下,插入框架Html,布布扣,bubuko.com

ie11下,插入框架Html

标签:style   blog   http   color   cti   html   

原文地址:http://www.cnblogs.com/bluers/p/3830106.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!