Advertisement
Guest User

Untitled

a guest
Jun 19th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var xhr = new XMLHttpRequest();
  2.     var formData = new FormData();
  3.  
  4.     formData.append('text', value);
  5.  
  6.            
  7.         xhr.open("POST", "../contacts/load");
  8.            
  9.         xhr.setRequestHeader('Content-Type', 'text/html');
  10.            
  11.         xhr.send(formData);
  12.    
  13.            
  14.         console.log(value);
  15. ///////
  16.  
  17. $.ajax({
  18.   url: "../contacts/load",
  19.   type: "POST",
  20.   dataType: "html",
  21.   data: { text:value}
  22. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement