How to take HTML form data and write to XML using JQuery?

后端 未结 3 434
不思量自难忘°
不思量自难忘° 2021-01-16 18:38

I have a form that looks like this:

3条回答
  •  别那么骄傲
    2021-01-16 18:55

    You won't be able to create or edit a local XML file using javascript/jquery because of security concerns. Imagine going to a website and the webmaster wrote some code doing who knows what and puts this in a file on your computer...

    The only way to write to a local file using javascript is to use cookies or HTML5 localStorage.

    localStorage will allow you to store string keys and values of arrays and/or property names and values of objects.

    If you need an XML file you will have to call a server-side script that has permission to write the file on the server, which you can then access via it's url.

提交回复
热议问题