网页中调用IE命令

来源:互联网 发布:淘宝店铺异常pc端处理 编辑:程序博客网 时间:2024/04/29 15:56

1.调用IE的打印命令

<input onclick="document.execCommand('print',false,0) " />

2.调用IE的全选命令

<input onclick="document.execCommand('selectAll',false,null)"  />

3.刷新本页

<input onclick="document.execCommand(Refresh,false,null)"  />

4.指定路径保存

<input onclick="document.execCommand('SaveAs',false,'c: emp')"  />

5.另存为

<input onclick="document.execCommand('SaveAs',false,null)"  />

6.反向选择

<input onclick="document.execCommand('Unselect',false,null)"  />

8.删除(先选定文字,然后处理)

<input onclick="document.execCommand('delete',false,null)"  />