Simple ajax using json - Javascript jQuery

Javascript examples for jQuery:Json

Description

Simple ajax using json

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-2.0.1.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){//from   w ww.j  a va 2  s  . c o m
jQuery.ajax({
    url: '/ajax.example.php',
    data: {
        json: '{"a":"A", "b":"B"}'
    },
    contentType: false,
    processData: false,
    type: "POST"
})
    });

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

Related Tutorials