0

I have a json id for servlet reference and there is a message in this json id which I need to print on the webpage.
It works with textarea tag and alert, but I need to display the message in style (decorative,animate)
How can I do it?

Here is the ajax code:

$.ajax({
    url: "/hello3",
    type:"GET",
    data:"currentId=" +currentId ,
    dataType:"json",
    success: function(data,status){
    $('#json').val(" The deleted row is "+data.currentId)

}
});
});
});

This is my HTML:

<div>
    <textarea id="json" rows="10" cols="50" disabled></textarea>
</div>
4

1 回答 1

0

[演示]

尝试这个

$('#json').hide();
        $.ajax({
            url: "/hello3",
            type: "GET",
            data: "currentId=" + currentId,
            dataType: "json",
            success: function (data, status) {
                $('#json').text(" The deleted row is " + data.currentId).slideDown();

            }
        });
    });

希望这有帮助,谢谢

于 2013-08-26T18:15:54.200 回答