diff options
author | xengineering <mail2xengineering@protonmail.com> | 2020-12-24 12:17:46 +0100 |
---|---|---|
committer | xengineering <mail2xengineering@protonmail.com> | 2020-12-24 12:17:46 +0100 |
commit | 65713a14a0596a3493ca60696121c69b1e872b8c (patch) | |
tree | 105011910f48fb045a8a9775c568354824b3b80b /webroot/js | |
parent | a46322e7fdb8e83edc3e4dc6f254973e9f694156 (diff) | |
download | web-template-65713a14a0596a3493ca60696121c69b1e872b8c.tar web-template-65713a14a0596a3493ca60696121c69b1e872b8c.tar.zst web-template-65713a14a0596a3493ca60696121c69b1e872b8c.zip |
Add dynamic Functionality
Diffstat (limited to 'webroot/js')
-rw-r--r-- | webroot/js/example.js | 14 |
1 files changed, 14 insertions, 0 deletions
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); + +} + |