HTML DOM টেবিল createTFoot() পদ্ধতি একটি খালি
উপাদান তৈরি করে এবং একটি HTML নথিতে টেবিলে যোগ করে।সিনট্যাক্স
নিচের সিনট্যাক্স −
object.createTFoot()
আসুন HTML DOM টেবিল createTFoot() পদ্ধতি -
-এর একটি উদাহরণ দেখিউদাহরণ
<!DOCTYPE html>
<html>
<style>
body {
color: #000;
background: lightblue;
height: 100vh;
text-align: center;
}
table {
margin: 2rem auto;
}
caption {
color: #db133a;
}
.btn {
background: #db133a;
border: none;
height: 2rem;
border-radius: 2px;
width: 40%;
display: block;
color: #fff;
outline: none;
cursor: pointer;
margin: 1rem auto;
}
.show {
font-size: 1.2rem;
}
</style>
<body>
<h1>DOM Table createTFoot() Method Demo</h1>
<table border="2">
<tr>
<td>Name</td>
<td>Roll No.</td>
</tr>
<tr>
<td>John</td>
<td>071717</td>
</tr>
<tr>
<td>Jane</td>
<td>031717</td>
</tr>
</table>
<button onclick="create()" class="btn">Create Footer</button>
<script>
function create() {
var tableFooter = document.querySelector('table').createTFoot();
tableFooter.innerHTML = "This is table footer";
}
</script>
</body>
</html> আউটপুট

টেবিলের জন্য একটি ফুটার তৈরি করতে "ফুটার তৈরি করুন" বোতামে ক্লিক করুন৷
৷
