我试图计算 html 表中的动态行数,其中在计算行数时,它也在计算表头,并且我想在输入框中显示行数。
$(document).ready(function(){
$(".count").click(function(){
// Select all the rows in the table
// and get the count of the selected elements
var rowCount = $("#tbpnr tr").length;
var x = document.write(rowCount*280).innerHTML;
return(x);
document.getElementById("answer").value = x;
});
});
一只斗牛犬
缥缈止盈
相关分类