index.html 558 B

12345678910111213141516171819202122
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title></title>
  5. <script>
  6. var xhr = new XMLHttpRequest();
  7. xhr.open("POST", "http://localhost:8124/css_save", true);
  8. xhr.setRequestHeader("x-path", "/tmp/test.txt");
  9. xhr.onreadystatechange = function (aEvt) {
  10. console.log(aEvt)
  11. };
  12. xhr.send("asdfsdf sdfkjs dkf");
  13. </script>
  14. </head>
  15. <body>
  16. <form action="http://localhost:8124/css_save" method="POST">
  17. <input name="path" value="file:///Users/nv/Code/CSSOM/server/index.html">
  18. <textarea name="content">Fuu</textarea>
  19. <button>Submit</button>
  20. </form>
  21. </body>
  22. </html>