我正在打印一張桌子,我需要給它一些邊框,例如字體大小,我該怎麼做呢? thanks`如何將一些CSS屬性添加到jQuery表中?
//調用的json功能
success: function(json) {
var html="";
html+="<table>";
html+="<tr>";
html+="<td>"+"Categoria";
html+="</td>";
html+="<td>"+"Numero";
html+="</td>";
html+="</tr>";
var meta=json.meta;
var nome=meta.categoria;
var risultati=json.risultati;
console.log("json",json);
console.log("meta", json.meta);
console.log("nome", json.meta.nome);
var categoria;
var n_poi;
// printing the array with the values
for(i=0; i<risultati.length; i++){
categoria=risultati[i].categoria;
n_poi=risultati[i].n_poi;
html+="<tr>";
html+="<td>"+categoria;
html+="</td>";
html+="<td>"+n_poi;
html+="</tr>";
}
html+="</table>";
$("#table").append(html);
},`
爲什麼不把桌上的HTML元素的一些類,然後有一個定義應用到表這些類的風格在頁面上預定義的CSS塊? –