如何使用jquery asp.net将文件保存在文件夹中 [英] How to save image in folder using jquery asp.net

查看:81
本文介绍了如何使用jquery asp.net将文件保存在文件夹中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用特定路径中的JQuery将图像存储在文件夹中。



非服务器端。

解决方案

< blockquote>您可以使用cookie或 localStorage 。但是,无法将图像文件保存到客户端的特定路径上。

要创建cookie,请查看此处:

http://stackoverflow.com/questions/14573223/set-cookie-and-get-cookie-with -javascript [ ^ ]

localStorage

设置 localStorage ,使用此代码:

 localStorage.setItem('  image''  imageData'); 



并获取图像:

  if (localStorage .getItem('  image')){ //  检查是否存在 
var imageData = localStorage.getItem(' image');
}



更多信息: http://www.webdesignerdepot.com/2013/04/how-to-use-local-storage-for-javascript/ [ ^ ]


How to Image store in folder using JQuery in specific path.

Not Server Side.

解决方案

You can use cookies or the localStorage. It's not possible to save the image file to a specific path on the client side, however.
To create a cookie, have a look here:
http://stackoverflow.com/questions/14573223/set-cookie-and-get-cookie-with-javascript[^]
And the localStorage:
To set a localStorage, use this code:

localStorage.setItem('image', 'imageData');


And to get the image:

if (localStorage.getItem('image')) { // check for existence
    var imageData = localStorage.getItem('image');
}


More information: http://www.webdesignerdepot.com/2013/04/how-to-use-local-storage-for-javascript/[^]


这篇关于如何使用jquery asp.net将文件保存在文件夹中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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