使用JavaScript保存HTML5数据 [英] Saving HTML5 data using JavaScript

查看:111
本文介绍了使用JavaScript保存HTML5数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是用于我的POC/原型项目.我想通过单击提交按钮(< button>标签)来保存HTML5应用程序中的表单数据.我想将当前数据以xml格式保存到本地计算机,并进行一些测试,然后实施真实项目.

请告诉我如何使用javascript/Jquery处理相同的问题?

This is for my POC/prototype project. I want to save the form data from HTML5 application on the click of a submit button(<button> tag). I want to save the data currently to my local pc in the xml format and do some testing and then implement the real project.

Pls tell me how can I handle the same by using javascript/Jquery?

推荐答案

我想您想要本地存储.这是一篇非常好的文章: http://diveintohtml5.info/storage.html [ XML和JavaScript [ JQuery [ ^ ].
I suppose you want local storage. This is a really good article: http://diveintohtml5.info/storage.html[^].
Of course, you can store your data in xml also, but I doubt, that this could be a good idea. JSON representation looks more adequate - aside from some really special cases.
But of course, you can manipulate xml on client side with javascript. See some examples here:
XML and JavaScript[^] or JQuery[^].


这篇关于使用JavaScript保存HTML5数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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