用于检测用户何时保存网页的Javascript? [英] Javascript to detect when a user saves the web page?

查看:55
本文介绍了用于检测用户何时保存网页的Javascript?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

javascript是否可以检测用户何时将网页保存到本地磁盘?还是其他一些客户端脚本中有类似的功能?

Can javascript detect when a user saves the web page to their local disks? Or is there a similar functionality in some other client side scripts?

推荐答案

您可以观看ctrl + s组合键的击键操作.但是,如果用户选择通过菜单进行保存,则无法捕获该内容.

You could watch the key commands for the combination of ctrl + s to be hit. But if the user chooses to save through the menu, there is no way to capture that.

这篇关于用于检测用户何时保存网页的Javascript?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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