简体   繁体   中英

Programmatically Calling Browser Right-Click Menu Options?

I would like to be able to programmatically invoke the right-click menu options, initiated from user events like rollover and whatnot of course. Is this possible?

Specifically, I would like to be able to call the Safari "Use Image as Desktop Picture" or the "Add Image to iPhoto Library", or the Firefox "Set as Desktop Background" using pure Javascript, so you don't have to right click. Is that possible?

You can't and this is because of security limitations.

If you could do that, malicious websites can access your browser and tamper with your system.

As far a I know, there is absolutely no way of doing this in a generic form using pure Javascript. You would have to build extensions (or maybe a Greasemonkey script for Firefox, I don't know) for each browser.

我非常希望您不能这样做...任何网站都不能触摸我的桌面图片或iPhoto库。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM