作家
登录

html下载本地

作者: 来源:www.28hudong.com 2013-03-30 04:10:17 阅读 我要评论

通过javascript 实现 index.html <a href=# onclick="window.open('temp.html');return(false);">下载文件</a> ####### temp.html //被下载文件 <Script language="javascript"> if (typeof(window.opener) != 'undefined') //判断 打开方式的下载。 去掉会一打开文件就弹出下载框 { document.execCommand('SaveAs'); window.close(); } </Script> ################ <button onclick="javascript:document.execCommand('SaveAs');">保存本页面</button>

  推荐阅读

  accesskey 提交

<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>无标题文档</title></head> <body><form action="http://www.jluvip.com/index.html" method=POST name=form1><textare>>>详细阅读


本文标题:html下载本地

地址:http://www.17bianji.com/kaifa2/JS/31754.html

关键词: 探索发现

乐购科技部分新闻及文章转载自互联网,供读者交流和学习,若有涉及作者版权等问题请及时与我们联系,以便更正、删除或按规定办理。感谢所有提供资讯的网站,欢迎各类媒体与乐购科技进行文章共享合作。

网友点评
自媒体专栏

评论

热度

精彩导读
栏目ID=71的表不存在(操作类型=0)