“AJAX GET SOLIT” Código de respuesta

AJAX GET SOLIT

$.ajax({
        url: "https://app.asana.com/-/api/0.1/workspaces/",
        type: 'GET',
        dataType: 'json', // added data type
        success: function(res) {
            console.log(res);
            alert(res);
        }
    });
SeriousMonk

jQuery Ajax Get

$.ajax({
    	url: "www.site.com/page",
    	success: function(data){ 
    	    $('#data').text(data);
    	},
    	error: function(){
    		alert("There was an error.");
    	}
    });
Dr. Hippo

error de AJAX Obtenga salida

$.ajax({
    type:     "post",
    data:     {id: 0},
    cache:    false,
    url:      "doIt.php",
    dataType: "text",
    error: function (request, error) {
        console.log(arguments);
        alert(" Can't do because: " + error);
    },
    success: function () {
        alert(" Done ! ");
    }
});
Matteoweb

AJAX DATA POST LLAME en JavaScript

$.ajax({
   url: 'ajaxfile.php',
   type: 'post',
   data: {name:'yogesh',salary: 35000,email: '[email protected]'},
   success: function(response){

   }
});
Tame Teira

Ajax obtiene respuesta html

//your jquery code will be like this:
$.ajax({
      type: 'POST',
      url: $url,
      data: new FormData(this),
      dataType: 'json',
      contentType: false,
      processData:false,//this is a must
      success: function(response){ 
      		$('your_selector').html(response);
      }
});

//php code will be like this
echo '<div>some html code</div>';
die();
Anime Freak

Ajax Get Method en jQuery

    $.get("demo_test.asp", function(data){ //change demo_test.asp to your server route
      alert("Data: " + data);
    });
Beautiful Buzzard

Respuestas similares a “AJAX GET SOLIT”

Preguntas similares a “AJAX GET SOLIT”

Más respuestas relacionadas con “AJAX GET SOLIT” en JavaScript

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código