如何通过自定义上下文菜单从Web浏览器保存图像? [英] How to save an image from web browser via custom context menu ?

查看:138
本文介绍了如何通过自定义上下文菜单从Web浏览器保存图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好! :D

我正在开发一个Web浏览器,我已经将关联的菜单关联到我的Web浏览器,我们称之为WebMenu,我已经完成了所有功能(例如,全选,复制,粘贴等),但是我没有不知道如何使保存图像功能起作用.为了获得更好的描述,您是否看到ie上下文菜单? 将图片另存为..."命令?我想要那样,所以请帮助我:).

Hello ! :D

I am developping a web browser , i have made a associated a context menu to my web browser , let''s call it WebMenu , i have made all function (e.g select all , copy , paste , etc...) but i don''t know how to make save image function to work . For better description , have you see the ie context menu ??? the "Save Picture As..." command ? I want just like that , so please help me :) .

推荐答案

TheDevelopper写道:
TheDevelopper wrote:

将图片另存为..."命令?

he "Save Picture As..." command ?



如果您已经注意到,仅当右键单击图片时,将图片另存为"才会出现在IE中.

因此,您需要具有基于单击表单的位置的自定义上下文菜单.假设您在图片上单击它,然后可以获得图片的详细信息.获得图像信息后,单击保存图像功能",只需在保存事件中使用图像详细信息即可.



If you would had noticed, the ''Save Picture As'' appears in IE only when right clicked on a picture.

So, you need to have custom context menus based on where you click on the form. Lets say you click it on an image, then you can get the details of the image. Once you have the image information, on click of ''Save Image function'' just use the image details to work with in the save event.


这篇关于如何通过自定义上下文菜单从Web浏览器保存图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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