用js保存页面指定内容
来源:互联网 发布:linux postgresql 编辑:程序博客网 时间:2024/05/17 03:50
用js保存页面指定内容
转自: http://rorchina.iteye.com/blog/184425
- <script language=javascript>
- function Save(){
- var txt = document.all.output.value;
- b = window.open();
- b.document.open();
- b.document.write(txt);
- b.document.close();
- b.document.execCommand('saveas',true,'output.html');
- b.window.close();
- }
- </script>
- <center>仅保存文本框中部分:</center>
- <table width="90%" align="center" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td>不保存</td>
- <td><input type="button" value="Save" class="trans" onclick="Save()">
- <textarea rows="20" cols="50" id="output" class="txtedit"></textarea>
- </td>
- </tr>
- </table>
保存HTML中的Table到Excel中
转自:http://www.bcbbs.net/news/Content28841.aspx
- <html>
- <head>
- <title>保存HTML中的Table到Excel中</title>
- </head>
- <body>
- <h1>保存内容到Excel中</h1>
- <table id='content'>
- <tr><td>列1</td><td>列2</td></tr>
- <tr><td>a1</td><td>a2</td></tr>
- <tr><td>b1</td><td>b2</td></tr>
- <tr><td>c1</td><td>c2</td></tr>
- <tr><td>d1</td><td>d2</td></tr>
- <tr><td>e1</td><td>e2</td></tr>
- <tr><td>f1</td><td>f2</td></tr>
- </table>
- <a href="javascript:downloadfile('content')">保存文件</a>
- <script language="javascript">
- function downloadfile(id)
- {
- window.document.write(document.getElementById(id).outerHTML);
- window.document.execCommand("SaveAs",false,"C:\\download.xls");
- history.go(-1);
- }
- </script>
- </body>
- </html>
- 用js保存页面指定内容
- 用js保存页面指定内容
- 用js保存页面指定内容
- 用js保存页面指定内容
- Js打印页面指定内容
- js打印页面指定内容
- JS简单方法打印页面指定内容
- js打印页面指定区域内容
- 用JS刷新指定页面
- 用javascript拷贝保存页面控件内容
- js快捷键保存内容
- JS打印指定内容
- js 保存页面数据
- 不指定src, 用js生成 iFrame/新窗口 里面的内容(可用于scriptX打印部分页面等)
- 用js来刷新指定页面
- 用js来刷新指定页面
- js刷新指定页面
- 指定页面内容的打印
- android 修改api后编译报错
- (4)打开PL/SQL准备登录的时候出现Could not load "F:\app\USER\product\11.2.0\dbhome_1\BIN\oci.dll"
- protected 与 public
- 微软Xbox One在欧洲8国跳票:11月仅登陆13国
- 回家看是否节目将规划
- 用js保存页面指定内容
- s3c2440,s3c6410,s5p6450地址空间和连线
- 免费实用微软系统工具集推荐
- juniper/cisco commands
- js trim函数
- C 关键字
- windows下如何获取系统音量(使用mixer api)
- Win7 Win8建立扩展分区的方法
- android:点击popupwindow以外区域 popupwindow自动消失