O
O
Oleg2015-12-28 19:33:24
JavaScript
Oleg, 2015-12-28 19:33:24

How to make table cell editable?

How to make a click on a table cell containing data to turn it into an input field in which you can change the value?
I would not like to invent a curved bicycle, especially since I have already met this many times on other sites.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladislav Samoilenko, 2015-12-28
@ptrvch

Table is our parent element, by setting the following attribute, the site visitor is given the opportunity to edit the content of the child elements.
<table contenteditable="true">

M
Mark Doe, 2015-12-28
@mourr

contentEditable

document.getElementById("#myCoolTD").contentEditable = true;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question