[英]How do I select all the column headers from a table
這是我的小提琴
這是我的位置:
$('#mytable thead tr').each(function(index) {
//console.log($(this).html())
console.log(index)
});
$(this).html()
獲取所有列標題。
這是小提琴
$('#mytable thead tr th').each(function(index) {
console.log($(this).html())
console.log(index)
});
Headers
存儲在th
,因此您需要更深一層。
$('#mytable thead tr th').each(function(index) {
console.log($(this).html())
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.