开发者

Ctr+s event on clicking a hyperlink

开发者 https://www.devze.com 2023-03-19 17:18 出处:网络
I have a hyperlink, when i c开发者_StackOverflow社区lick this link Ctr+s event should be fired which results in prompting to save the webpage. How can i call Ctr+s event when clicking a link I needs t

I have a hyperlink, when i c开发者_StackOverflow社区lick this link Ctr+s event should be fired which results in prompting to save the webpage. How can i call Ctr+s event when clicking a link I needs this in javascript or jquery


add onClick event same as Ctrl+S. Don't return false in onClick


I believe this works in ie.

<a href="javascript:void(0);"  onclick="document.execCommand('SaveAs');"
 >Save this page</a>
0

精彩评论

暂无评论...
验证码 换一张
取 消