从HTML表单中存储数据 [英] store data from a form using just HTML

查看:93
本文介绍了从HTML表单中存储数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个表单(将由用户填写)并将数据存储在excel样式表中,而不使用PHP只是HTML,是可能的吗?

I want to create a form (will be filled by users) and store the data in excel stylesheet without using php just HTML ,is that possible?

我不想要将数据存储在一个数据库中。

I dont want to store data an a database.

我试图使用谷歌文档,但这并不好,因为验证消息是根据浏览器语言生成的。

I have tried to use google doc but it's not that good because the validation messages are generated depending on the browser language.

推荐答案

不,HTML页面无法写入文件。您需要一个服务器来执行此操作。

No, HTML pages cannot write files. You need a server to do this.

最好的方法是在文本区域中生成CSV数据,然后用户可以将其复制并粘贴到本地文件,然后加载进入Excel。

The best you can do is generate CSV data in a textarea that the user could then copy and paste to a local file, then load that into Excel.

这篇关于从HTML表单中存储数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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