send get request with button to endpoint
form.addEventListener('submit', (event) => {
event.preventDefault(); //stop reload
let input = document.querySelector('input');
let method = 'GET';
let endpoint = `request url ${input.value}`;
xhr.open(method, endpoint);
xhr.send(); //if in the link what you looking for this send will be empty!!!
});
Also in JavaScript:
- Uncaught ReferenceError: Vue is not defined
- adding a default option in switch statements
- duplicate characters in a string javascript
- scroll to id reactjs
- javascript object first key
- create 2d array in javascript filled with 0
- javascript console group
- javascript for group object properties based on another property
- take a screenshot javascript of canvas
- js localstorage boolean
- js arrotondare superiore numero
- jquery get aria-label value
- javascript type casting int
- remove whitespace javascript
- javscript rename property name
- extract string from text file javascript
- express receive post data
- how to make a bot react to own message js
- javascript change voice language
- circle wave js
- javascript convert array of objects to array of uri
- angular tilt
- calculate rating out of 5
- javascript substring vs substr