简体   繁体   中英

Save form data via ajax with no server code

I am looking for a way to save simple form data from a static web page without any server-side code. I've considered something like MongoLab via RESTful interface, but that would require including API credentials client-side and the saved data must be private. Any suggestions? Thanks.

you need to post you form data somewhere, so you must have a server listening for a http form submit, or alternatively use something like socket.io / WebSockets to send all the data to a server. You cannot write to a database from a user browser without contacting some server that will write the information to the database..

Hadn't thought of using a BaaS (back-end-as-a-service) provider like parse or stackmob, but that's the solution. Just hadn't thought of using it for a simple, static web page. I signed up for parse.com and was collecting data within five minutes!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM