Método deleteTHead() da tabela
Exemplo
Remova um elemento <thead> de uma tabela:
document.getElementById("myTable").deleteTHead();
Definição e uso
O método deleteTHead() remove o elemento <thead> (e seu conteúdo) da tabela.
Dica: Para criar um novo elemento <thead> para uma tabela, use o método createTHead() .
Suporte ao navegador
Method | |||||
---|---|---|---|---|---|
deleteTHead() | Yes | Yes | Yes | Yes | Yes |
Sintaxe
tableObject.deleteTHead()
Parâmetros
Nenhum |
Detalhes técnicos
Valor de retorno: | Sem valor de retorno |
---|
Mais exemplos
Exemplo
Crie e exclua um elemento <thead>:
function myCreateFunction() {
var table = document.getElementById("myTable");
var header = table.createTHead();
var row = header.insertRow(0);
var cell = row.insertCell(0);
cell.innerHTML = "<b>This is a table header</b>";
}
function myDeleteFunction() {
document.getElementById("myTable").deleteTHead();
}
Páginas relacionadas
Referência HTML: tag HTML <thead>
❮ Objeto de Tabela