Request.HTML

by dmethvin

JavaScript

// HTML example
$.ajax({
    url: '/echo/html/',
    type: "POST",
    dataType: "html",
    data: {
        delay: 1,
        html: '<p class="happy">Hello world!</p>'
    },
    success: function(data) {
        alert("success! "+data);
    },
    error: function(xhr){
        alert("Error!");
    }
});