一个相当无聊的问题-->如何按一下按钮就能一次过下载几个文件呢?? Web form 里面如何only click a button ,就能一次过下载几个文件呢?或者有什么其它方法能完成只做一个动作就能一次下载几个文件呢?这个问题真系无聊,不过老板要求这样做,无办法. 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script language=javascript><!--function down(){ window.open("a"); window.open("b"); window.open("c");}//--></script>button调用改函数a,b,c为下载url 可以的,可以先得到要下载的文件的filename,然后foreach循环下载。 huleeyar(虚拟过客) 那个方法不行吧, 因为我那几个文件是Excel文件,如果用这方法就会在屏幕上直接显示出几个Excel的窗口,这样不行.我是想做到好象平常普通下载东西那样,一click完button就问save去那里,然后就保存在用户所选的地方. 以下是我做下载一个文件的代码,谁知道用那种方法可以做出下载几个文件的功能呢 : Response.ClearHeaders(); Response.ClearContent(); strDrive = "c:\\bb.xls"; filename = "bb.xls"; Response.Clear(); Response.ContentType = "application/octet-stream"; Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312"); Response.AppendHeader("Content-Disposition","attachment; Filename = " + System.Convert.ToChar(34) + filename + System.Convert.ToChar(34) ); Response.Flush(); Response.WriteFile( strDrive ); Response.End(); Response.Close(); 用WINDOWS API向窗口传递信息 关于fck上传图片保存到其他盘问题 想问问水晶报表的数据填充 关于创建系统的数据处理接口 关于窗体显示的问题 服务器跟客户端的通信问题,请高手指教! 高手请进 windowForm中如何写textbox的email的验证正测表达式 怎样让textbox中只能输入数字? 大家帮我看看,不是很复杂的问题 求救!为什么我用本地SMTP服务器(localhost)发送邮件老是被对方主机拒绝!大侠帮帮忙啊 编译工程中的许多项目的dll到一个目录??
<!--
function down()
{
window.open("a");
window.open("b");
window.open("c");
}
//-->
</script>
button调用改函数a,b,c为下载url
Response.ClearHeaders();
Response.ClearContent();
strDrive = "c:\\bb.xls";
filename = "bb.xls";
Response.Clear();
Response.ContentType = "application/octet-stream";
Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
Response.AppendHeader("Content-Disposition","attachment; Filename = " + System.Convert.ToChar(34) + filename + System.Convert.ToChar(34) );
Response.Flush();
Response.WriteFile( strDrive );
Response.End();
Response.Close();