如何通过自定义上下文菜单从Web浏览器保存图像?

编程入门 行业动态 更新时间:2024-10-27 12:39:19
本文介绍了如何通过自定义上下文菜单从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浏览器保存图像?

本文发布于:2023-11-23 02:21:59,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1619733.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:上下文   自定义   图像   菜单   浏览器

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!