我可以配置一个HTML按钮,始终与QUOT;目标另存为"当被点击? [英] Can I configure an HTML button to always "save target as" when being clicked?

查看:194
本文介绍了我可以配置一个HTML按钮,始终与QUOT;目标另存为"当被点击?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我生成一个应用程序我做的CSV文件。

I'm generating CSV files in an application I'm doing.

现在,我将显示完成的文件作为纯HTML链接,但我想使他们的按钮。

Right now I'm displaying the finished files as plain HTML links, but I would like to make them buttons.

问:结果
是否有可能配置一个按钮,它触发了右键点击&放大器;目标另存为操作,因为点击该按钮将尝试加载CSV文件浏览器

Question:
Is it possible to configure a button so it triggers the "right click & save target as" action, because clicking on the button will try to load the CSV file in the browser.

如果没有,是否有另一种方式来prevent被点击的按钮目标和可能显示警报,所以该链接不会被跟踪。

If not, is there another way to prevent the button target being clicked and maybe display an alert, so the link is not being followed.

谢谢!

推荐答案

我不知道您打算如何做到这一点没有一些服务器的帮助,但你可以在这看看,看看它是否有助于你得到的地方
http://www.jtricks.com/bits/content_disposition.html

I'm not sure how you plan to do this without some server help, but you could take a look at this and see if it helps you get somewhere http://www.jtricks.com/bits/content_disposition.html

这篇关于我可以配置一个HTML按钮,始终与QUOT;目标另存为"当被点击?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆