Javascript 为什么表头在jade中也使用表数据进行排序?
这是我的代码示例,它工作得很好,但唯一的问题是,当我单击表头时,它会对数据进行排序,但也会包含表头本身Javascript 为什么表头在jade中也使用表数据进行排序?,javascript,html,pug,Javascript,Html,Pug,这是我的代码示例,它工作得很好,但唯一的问题是,当我单击表头时,它会对数据进行排序,但也会包含表头本身 表格标题元素需要位于thead中才能识别为表格标题。然后剩下的进入t正文 另见: 表格标题元素需要位于thead中才能识别为表格标题。然后剩下的进入t正文 另见: 非常感谢@Lister现在它工作得很好再次感谢你非常感谢@Lister现在它工作得很好再次感谢你 .Container.feedPageComponent.feedPageHome script(src='/dashboard/b
表格标题元素需要位于
thead
中才能识别为表格标题。然后剩下的进入t正文
另见:
表格标题元素需要位于
thead
中才能识别为表格标题。然后剩下的进入t正文
另见:
非常感谢@Lister现在它工作得很好再次感谢你非常感谢@Lister现在它工作得很好再次感谢你
.Container.feedPageComponent.feedPageHome
script(src='/dashboard/bootstrap/js/tablesort.js')
script.
var something = function(text) {
console.log('something', text);
var value = text;
window.location.href="#{baseUrl}/feed/searchData/"+value
}
function init() {
new Tablesort(document.getElementById('myTable'));
}
window.onload = init;
div.input
input(type="text",id="demo" name="title", placeholder="Search Your Articles",onchange="something(this.value)")
div
table#myTable.table.table-striped
tr
th Date
th Time
th Title
th Type
th Delete
th User
th Share
- for item in data.rows.feedArray
tr
- var a = new Date(item.publishDate)
if a == "Invalid Date"
td N/A
td
else
td #{a.toDateString()}
td
...
table.table.tablesorter.table-bordered
thead
tr
th Name
th Label
th Created
th Expires
th Type
th Status
th.last
tbody
each tape in tapes
...