Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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!!!
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery user function override 
Javascript :: greater than x but less than y es6 
Javascript :: js fill array with count elements 
Javascript :: Beginning Node.js 
Javascript :: javascript lookahead 
Javascript :: pm2 group console messages 
Javascript :: angular url not valid send you to a component 
Javascript :: resellerclub api with react js 
Javascript :: gatsby creating pages from contentful 
Javascript :: undo npm run eject react 
Javascript :: ejecutar una funcion js con id html usando jquery 
Javascript :: how to post json to cloudwatch 
Javascript :: Ivy J. Livingston 
Javascript :: react native navigation paramlist never used 
Javascript :: JavaScript Implementation of Linear Search 
Javascript :: redux filter movies list container 
Javascript :: material ui notify 
Javascript :: html link file in another folder 
Javascript :: Decodes a string of data which has been encoded using base-64 encoding - Nodejs 
Javascript :: detect click on link in all places javascript 
Javascript :: liquid - array item accessing 
Javascript :: get and storing json array android 
Javascript :: create react app run test apecific folfer 
Javascript :: tinymce-angular load slow 
Javascript :: correctly type checking objects in javascript 
Javascript :: How To Add Google Social Login Button 
Javascript :: exit forEach when null javascript 
Javascript :: && in react jsx 
Javascript :: pipefy deleteCard 
Javascript :: Stateful/Container/Smart component 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =