Difference between revisions of "Widget:DataExporter"
From LINKS Community Center
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
− | <!DOCTYPE html> | + | <!DOCTYPE html> |
− | <html> | + | <html> |
+ | |||
<head> | <head> | ||
<script> | <script> | ||
Line 12: | Line 13: | ||
async function exportData() { | async function exportData() { | ||
− | const res = await fetch( | + | const res = await fetch(usr); |
+ | console.log(res) | ||
document.getElementById('output').innerText = JSON.stringify(res); | document.getElementById('output').innerText = JSON.stringify(res); | ||
} | } | ||
</script> | </script> | ||
</head> | </head> | ||
+ | |||
<body> | <body> | ||
<button type="button" onclick="exportData()">Export Data</button> | <button type="button" onclick="exportData()">Export Data</button> | ||
Line 23: | Line 26: | ||
</pre> | </pre> | ||
</body> | </body> | ||
− | </html> | + | |
+ | </html> | ||
</includeonly> | </includeonly> |