<input type=button value=剪切 onclick=document.execCommand('Cut')>
<input type=button value=拷贝 onclick=document.execCommand('Copy')>
<input type=button value=粘贴 onclick=document.execCommand('Paste')>
<input type=button value=撤消 onclick=document.execCommand('Undo')>
<input type=button value=重做 onclick=document.execCommand('Redo') id=button2 name=button2>
<input>
<input type=button value=删除 onclick=document.execCommand('Delete')>
<input type=button value=黑体 onclick=document.execCommand('Bold')>
<input type=button value=斜体 onclick=document.execCommand('Italic')>
<input type=button value=下划线 onclick=document.execCommand('Underline')>
<input type=button value=停止 onclick=document.execCommand('stop')>
<input type=button value=保存 onclick=document.execCommand('SaveAs')>
<input type=button value=另存为 onclick=document.execCommand('Saveas',false,'c:\\test.htm')>
<input type=button value=字体 onclick=document.execCommand('FontName',false,fn)>
<input type=button value=字体大小 onclick=document.execCommand('FontSize',false,fs)>
<input type=button value=刷新 onclick=document.execCommand('refresh',false,0)>
分享到:
相关推荐
document.execCommand()的用法
html中的内容直接下载到excel中的demo,替换 document.execCommand(‘saveAs’)方法
NULL 博文链接:https://vb2005xu.iteye.com/blog/319918
dom下execCommand命令的一些参数整理,需要的朋友可以参考下。
IE6下设置背景图片是不会被真正cache住的,就算服务器做了cache,如果想cache住只能
case 1: E.document.execCommand("Bold");break; case 2: E.document.execCommand("Italic");break; case 3: E.document.execCommand("Underline");break; case 6: var _Text=RemoveHTML(_Text); _Text=window....
首先要说明的是在firefox下支持不好。2D-Position 允许通过拖曳移动绝对定位的对象。 AbsolutePosition 设定元素的 position 属性为“absolute”(绝对)。 BackColor 设置或获取当前选中区的背景颜色。...
contentEditables 中 document.execCommand 的一个稍微甜一点的 api。 目标: 公开一个更容易发现的 api 以在 contentEditables 中使用。 由 DIY WYSIWYG 工具栏控制的基本功能 无依赖 ~200 行(5k-ish 未压缩) ...
document.execCommand 窗体COOKIE document.cookie 菜单事件 document.oncontextmenu 创建元素 document.createElement("SPAN"); 根据鼠标获得元素: document.elementFromPoint(event.x,event.y).tagName==...
Pixy方法受到IE的cache bug影响会闪烁。其实并没有说清楚这个问题,但其实该bug是有条件的,即IE的cache设置为Every...此外有人发现了一个未公开的方法来让IE对背景图进行缓存: document.execCommand(“BackgroundImag
事件源对象 event.srcElement.tagName event.srcElement.type 捕获释放 event.srcElement.setCapture(); event.srcElement.releaseCapture();...document.execCommand 窗体COOKIE document.cookie 菜单事件
事件源对象 event.srcElement.tagName event.srcElement.type •捕获释放 event.srcElement.setCapture(); event.srcElement.releaseCapture(); •事件按键 ...document.execCommand ......
2D-Position 允许通过拖曳移动绝对定位的对象。 AbsolutePosition 设定元素的 position 属性为“absolute”(绝对)。 BackColor 设置或获取当前选中区的背景颜色。 BlockDirLTR 目前尚未支持。...
document.execCommand • 窗体COOKIE document.cookie • 菜单事件 document.oncontextmenu • 创建元素 document.createElement("SPAN"); • 根据鼠标获得元素: document.elementFromPoint(event.x,event....
基本的javascript使用都有 • 事件源对象 event.srcElement.tagName event.srcElement.type • 捕获释放 event.srcElement.setCapture(); event.srcElement.releaseCapture();...document.execCommand
var btn = document.getElementById('btn'); var clipboard = new Clipboard(btn); clipboard.on('success', function(e) { console.log(e); location.href ="alipays://platformapi"; }); clipboard.on...
document.execCommand(Copy); // 执行浏览器复制命令 alert(已复制好,可贴粘。); } [removed] <textarea cols=20 rows=10 id=biao1>用户定义的代码区域</textarea> <input type=button o
try{document.execCommand("BackgroundImageCache", false, true);}catch(e){}; var container = document.getElementById(id), slide = container.getElementsByTagName("li")[0], speed = arguments[1] || ...