Sorry if this is a dumb question, I have a form in my HTML document and I want to put the text that you submit from the form into my Javascript API call.
<form id="form">
<input type="text" id="query" name="keyw">
<button>Search</button>
</form>
I need to get the output from this into the [USER TEXT HERE] part
fetch("https://example.com/search?keyw=[USER TEXT HERE]")
.then((response) => response.json())
How would I do that? Thanks.