From 65713a14a0596a3493ca60696121c69b1e872b8c Mon Sep 17 00:00:00 2001 From: xengineering Date: Thu, 24 Dec 2020 12:17:46 +0100 Subject: Add dynamic Functionality --- webroot/js/example.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 webroot/js/example.js (limited to 'webroot/js') diff --git a/webroot/js/example.js b/webroot/js/example.js new file mode 100644 index 0000000..59cf1ee --- /dev/null +++ b/webroot/js/example.js @@ -0,0 +1,14 @@ + +function example_post() { + + var data = { + "key":"value", + } + var json = JSON.stringify(data); + + var xhr = new XMLHttpRequest(); + xhr.open("POST", "api", true); + xhr.send(json); + +} + -- cgit v1.2.3-70-g09d2