i have this problem:
$(document).ready(function() {
$('#buttonTest').click(function() {
$.get('/WebTestProject/ServletEsempio', function(responseJson) {
var $table = $('<table>').appendTo($('#result'));
$.each(responseJson, function(index, product) {
$('<tr>').appendTo($table)
.append($('<td>').text(index))
.append($('<td>').text(product))
});
});
});
});
this code is OK for calling my servlet, but i dont find how to close the TAG , and .
is it possible?
many thanks to all.
When you create elements using jQuery in this fashion, they are created automatically closed. However, even the jQuery documentation recommends that you close it explicitly:
Source: http://api.jquery.com/jQuery/#creating-new-elements