#Connecting Java backend with HTML frontend
4 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @meager coyote! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Use tags like <script> function getData() { fetch('http://localhost:8080/api/data') .then(response => response.text()) .then(data => { document.getElementById('result').innerText = data; }) .catch(error => console.error('Error:', error)); }
</script>
This message has been formatted automatically. You can disable this using /preferences.