简体   繁体   中英

Write to server: using text file with HTML5 Jquery/Javascript

I was wondering if it is possible to write to a server and storing it in a text file using Javascript/Jquery, HTML5. The purpose is, I am making a javascript/jquery game and I wanted to store the scores, without using any server-side language (php, asp, etc.) Thank you so much for the help, your time is much appreciated.

HTML, JS, CSS, all that is client-side. Meaning it runs in the browser and that's that.

PHP & ASP are server-side, meaning the code gets executed on the server and the result gets sent to the client.

You need a method of communication between the client and server. You can send requests using JS ( AJAX ) but you'll need something on the server to receive and do something with them. For that you need some server-side code.

So no, you can't update data on a server using only client-side technologies. You can , however, use client-side scripts to communicate with a server and tell the server-side code to update data.

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