如何检测在“保存/打开/取消"窗口中单击了哪个按钮对话? [英] How do I detect which button was clicked on "save/open/cancel" dialog?

查看:31
本文介绍了如何检测在“保存/打开/取消"窗口中单击了哪个按钮对话?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网页,成员可以在该网页上下载不同类型的文件.我不会获得有关每个成员下载了哪些文件以及下载了多少次的信息.当用户要下载文件时,他会在浏览器弹出窗口中获得3个选择:打开",保存"和取消".(浏览器中的文件对话框).我只想单击打开/保存"按钮来更新下载状态

I got a webpage where members can download different kind of files on. I wan't to get information about which files and how many times each member have downloaded. when the user want to download a file he get browser pop-up where he gets 3 choises: "Open", "save" and "Cancel".(file dialog box in browser). i want to update the download status only if open/save button is clicked

是否可以检测在保存/打开/取消"对话框中单击了哪个按钮?

Is there a way to detect which button was clicked on "save/open/cancel" dialog?

推荐答案

您可能不知道.某些浏览器甚至在用户决定如何处理文件之前就开始下载.但是,如果下载已完成,也许可以让您的Web服务器记录日志.这可能是您可以获得的最可靠的结果.

You can't know that. Some browsers even start the download before the user decides what to do with the file. But perhaps you can get your webserver to log if the download has been completed. That's probably the most reliable result you can get.

这篇关于如何检测在“保存/打开/取消"窗口中单击了哪个按钮对话?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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