diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/home.html | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/templates/home.html b/templates/home.html index b8f8e18..b6e76bf 100644 --- a/templates/home.html +++ b/templates/home.html @@ -9,6 +9,22 @@ <script src="/static/js/underscore-min.js"></script> <script src="/static/js/bootstrap.min.js"></script> <script> + function get_data() { + $.get('/data', function(res) { + alert(res); + }); + }; + + function save_data(data) { + $.ajax({ + type: 'POST', + contentType: 'application/json', + data: JSON.stringify(data), + dataType: 'json', + url: '/data', + }); + } + $(document).ready(function() { var CHANNELS = 8; var SUB_CHANNELS = 8; |
