Post data to server with ajax call - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:ajax

Description

Post data to server with ajax call

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.1.js"></script> 
      <script type="text/javascript">
 $(document).ready(function(){
     $.post("/echo/html/", { html: "hello world" }, function(data) {
          console.log(data);
     });/*from  www.jav a 2s . c  o m*/
 });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials