How to use in JavaScript Dom tr deleteCell

In this article I have described about tr deleteCell() method used in JavaScript.
  • 1535

tr deleteCell() method in JavaScript

  • If we want to delete a particular cell within a table then we can use tr deleteCell() method.

Browser support

Following are the main browsers which support the tr deleteCell() method

  • Internet Explorer.
  • Firefox.
  • Opera.
  • Google Chrome.
  • Safari.


The syntax of tr deleteCell() method as follows


Lets take an example

<!DOCTYPE html>



<script type="text/javascript">

    function displayResult()


        var firstRow = document.getElementById("Table").rows[0];





<body style ="background-color:green">

<table id="Table" border="1">







<br />

<button type="button" onclick="displayResult()">DELETE CELLS </button>







When we click on DELETE CELLS button


Further Readings

You may also want to read these related articles :here

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here


More Articles

© 2020 DotNetHeaven. All rights reserved.