通过单击移动浏览器中的链接或按钮将图像保存到本地文件夹 [英] Save an image to the local folder from the website by clicking a link or button in mobile browser

查看:406
本文介绍了通过单击移动浏览器中的链接或按钮将图像保存到本地文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何通过点击智能手机中的链接,使用JavaScript,jQuery或使用HTML控件来从网页中保存图片?

How can I save an image from the webpage by clicking on a link in smart phone, using JavaScript, jQuery or using HTML controls?

示例代码如下:

The sample code is as follows:

<a href="">Save image</a> 
<!--The Link to save the image-->
<img src"../images/logo.png" alt="Logo" height="50" width="50" /> 
<!--The Image that I wanted to save-->`

现在,我想通过点击智能手机中的链接(iPhone 4+,Android 2.1+和BlackBerry 6+),将图像 logo.png 保存到本地文件夹中。 ?

Now, I want to save the image logo.png in my local folder, by clicking on the link in smart phones (iPhone 4+, Android 2.1+ and BlackBerry 6+)?

推荐答案

当您点击一个直接指向可下载文件的链接时,通常浏览器会自行处理:要么问您想要保存它,或者将文件下载到预定义的位置。我不确定您是否可以覆盖此项。

Usually browsers have their own handling when you click a link which points directly to a downloadable file: either asks you where you want to save it, or it downloads the file to a predefined location. I'm not sure if you can override this.

这篇关于通过单击移动浏览器中的链接或按钮将图像保存到本地文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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