Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
奇怪...当我为 .doc 创建 HREF 时,浏览器行为正确,并且 onclick 允许用户下载文件。
如果我有 .docx 的 HREF,它不会提示用户下载文件,但会在文件的 url 处显示“找不到页面”错误页面。
有任何想法吗?
好的,刚刚想通了...这是需要添加的IIS MIME类型标头设置:.doc application/msword
不要忽略最明显的答案,但文件确实存在,链接是否正确?