How to delete a row from a table in JavaScript

In this article I have described about table deleteRow() method used in JavaScript.
  • 1140

Table deleteRow() method in JavaScript

  • As we know that a table object represents a table in HTML.
  • If want to delete the row from table then we can use table deleteRow() method

Browser support

Following are the main browsers which support the table deleteRow() method

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


The syntax of table deleteRow() method as follows


Lets take an example

<!DOCTYPE html>



<script type="text/javascript">

    function displayResult()






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

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










<br />

<button type="button" onclick="displayResult()">DELETE ROW FROM TABLE </button>







when we click on 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

© 2018 DotNetHeaven. All rights reserved.