资源预览内容
第1页 / 共4页
第2页 / 共4页
第3页 / 共4页
第4页 / 共4页
亲,该文档总共4页全部预览完了,如果喜欢就下载吧!
资源描述
*margin:0;padding:0;* html body overflow: visible;* html iframe, * html frame overflow: auto;* html frameset overflow: hidden;htmlmargin:0 auto; body div,body pmargin:0;padding:0; bodycolor:#575757; font:12px/22px Verdana,Arial,sans-serif,Times New Roman,;text-align:center; body,ul,ol,li,p,h1,h2,h3,h4,h5,h6,form,fieldset,table,td,img,div,trmargin:0;padding:0; input,selectfont-size:12px;vertical-align:middle; body divtext-align:left; .bb .bb pmargin:0;padding:0; .biaoqian width:55px; background-color:#CDA29C; color:#F12563; border:1px solid #F12563; margin-left:5px; margin-top:5px; height:20px; line-height:20px; float:left; font-size:12px; cursor:pointer; text-align:centerkiba自制文本编辑器 function $(id)return document.getElementById(id); var is_IE=(navigator.appName=Microsoft Internet Explorer)?true:false; var iframe=null; function init() iframe=$(iframe); textarea=$(area); var html=; iframe.contentWindow.document.open(); iframe.contentWindow.document.write(html); iframe.contentWindow.document.close(); if(is_IE) iframe.contentWindow.document.body.contentEditable=true; else iframe.contentWindow.document.designMode=on; run(); function run() insertHTML(*margin:0;padding:0;); function insertHTML(html) if(is_IE) iframe.contentWindow.focus(); var orange=getSelected().createRange(); orange.pasteHTML(html); var tagfont = document.frames(0).document.all.tags(body); if (tagfont!=null) for(i=0; itagfont.length; i+) tagfonti.style.fontSize=12px; tagfonti.style.fontFamily=Arial; else document.execCommand(insertHTML,html); var tagfont = document.frames(0).document.all.tags(body); if (tagfont!=null) for(i=0; itagfont.length; i+) tagfonti.style.fontSize=12px; tagfonti.style.fontFamily=Arial; function getSelected() return iframe.contentWindow.document.selection; function swapMode() if(iframe.style.display=none) iframe.contentWindow.document.body.innerHTML=textarea.value; textarea.style.display=none iframe.style.display= document.getElementById(yuanma).innerHTML=编辑界面; else textarea.value=iframe.contentWindow.document.body.innerHTML; textarea.style.display= iframe.style.display=none document.getElementById(yuanma).innerHTML=显示源码; function MyFontSize() iframe.contentWindow.document.body.innerHTML=+iframe.contentWindow.document.body.innerHTML+; textarea.value=iframe.contentWindow.document.body.innerHTML; var tagfont = document.frames(0).document.all.tags(div); if (tagfont!=null) for(i=0; itagfont.length; i+) tagfonti.style.fontSize=24px; tagfonti.style.fontFamily=Arial; 显示源码 文字大小 上传图片
收藏 下载该资源
网站客服QQ:2055934822
金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号