Jquery Ajax Put Example - Jquery

What is put method in jquery?

Snippet Code


  
Rate this page :
  [ 0 votes]

The PUT method is to make a HTTP request. Here HTTP methods like PUT and DELETE can be used, but some browsers will not support it. The sample code for jquery ajax put example is given below.

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script> $(document).ready(function () { $("#btn").click(function(){ $.ajax({ url: 'test.php', type: 'PUT', data: "name=John", success: function(data) { alert('Request was performed'); } }); }); }); </script> <input type='button' value='Check PUT method' id='btn'>

Tags


Ask Questions

Ask Question