如何实现右键-目标另存为(A).. 无法调用不过你可以在服务器端 设置Mime头,来骗IE 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 test.asp-------------<%response.ContentType="application/notmsword"Const adTypeBinary = 1Dim strFilePathstrFilePath = "c:\test.doc"Set objStream = Server.CreateObject("ADODB.Stream")objStream.OpenobjStream.Type = adTypeBinaryobjStream.LoadFromFile strFilePathResponse.BinaryWrite objStream.ReadobjStream.CloseSet objStream = Nothing%> 问题已解决感谢大家结贴<script language="javascript">function SaveAs(href,name){ var a = window.open(href) a.document.execCommand('Saveas',true,name) a.window.close() return false}</script><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>实验</title></head><body><a href="xxx.doc" onClick="return SaveAs(this.href,'ccc.doc')">文件另存为</a> </body></html>通过连接打开新页,然后另存想要的文件格式. 一段JS代码,请大家分析下其中的“时间”“步数”变量是那些?怎么传递给PHP变量! Extjs FormPanel 初始化是动态加载文本框 如何判断所请求的资源以及在缓存中? 用javascript实现按TAB键实现ul li间的切换 表情由小图显示出大图效果,但显示的位置不对,有代码,请教 关于在对象内部调用setInterval js提示缺少标识符 请问iframe的onreadystatechange在firefox下如果实现? confirm,无论选择“是”还是“否”都要运行以下的程序。 判断文本框是否有值? 如何使用focus()? 为何网页中加了一个Flash影片,速度就非常慢?
-------------
<%
response.ContentType="application/notmsword"Const adTypeBinary = 1
Dim strFilePathstrFilePath = "c:\test.doc"Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open
objStream.Type = adTypeBinary
objStream.LoadFromFile strFilePathResponse.BinaryWrite objStream.ReadobjStream.Close
Set objStream = Nothing
%>
结贴<script language="javascript">
function SaveAs(href,name)
{
var a = window.open(href)
a.document.execCommand('Saveas',true,name)
a.window.close()
return false
}
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>实验</title>
</head><body>
<a href="xxx.doc" onClick="return SaveAs(this.href,'ccc.doc')">文件另存为</a>
</body>
</html>通过连接打开新页,然后另存想要的文件格式.