日期:2014-05-16  浏览次数:20561 次

新手,求给一个可以下载文件的网页源码
想做一个网页,上面有一个链接,点击一下就能下载网站内的文件就可以了,越简单越好。

------解决方案--------------------
设置   Response.ContentType = "application/octet-stream"
------解决方案--------------------
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<html>
<head>
<title>下载文件</title>
<style>
a:link {text-decoration:none;}    /* 未被访问的链接 */
a:visited {text-decoration:none;} /* 已被访问的链接 */
a:hover {text-decoration:underline;}   /* 鼠标指针移动到链接上 */
a:active {text-decoration:underline;}  /* 正在被点击的链接 */
</style>
</head>
<body>
<p><b><a href="这里写地址">下载地址</a></b></p>
</body>
</html>