Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

passing data variable using ajax

var myVar = "test";

 $.ajax({
  url: "test.php",
  type: "POST",
  data:{"myData":myVar}
}).done(function(data) {
     console.log(data);
});
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery switch class 
Javascript :: get cookie value in javascript 
Javascript :: javascript parsefloat() method 
Javascript :: select remove option jquery 
Javascript :: get buffer from file javascript 
Javascript :: javascript range 
Javascript :: bootstrap modal disable close on click outside react bootstrap 
Javascript :: vue.js function to always uppercase when the client input lowercase 
Javascript :: how to cut a string uptil specific character javascript 
Javascript :: sum row values in datatable jquery 
Javascript :: tailwind modal react 
Javascript :: material ui textfield error 
Javascript :: jquery on type event 
Javascript :: javascript convert minutes to hh mm 
Javascript :: get all from dir node 
Javascript :: register a service worker 
Javascript :: how to copy to clipboard in react js 
Javascript :: angular generate module with rooting 
Javascript :: web-vitals react 
Javascript :: javascript check if string is number 
Javascript :: js get current function name 
Javascript :: trigger click on checkbox jquery 
Javascript :: javascript get random items from array 
Javascript :: encodeuri hashtag 
Javascript :: string to binary javascript 
Javascript :: javascript remove duplicate letters in a string 
Javascript :: js matrix 
Javascript :: safeareaview react native 
Javascript :: remove div by class name javascript 
Javascript :: react multiple event handlers] 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =