Found the answer myself.. Just go in the wanted cell and put the contenteditable
attribute like this:
<td contenteditable>Whatever</td>
سؤال
I would like to edit the content of a cell in an HTML table.
Is there an attribute for editing or I have to use some kind of script?
المحلول 2
Found the answer myself.. Just go in the wanted cell and put the contenteditable
attribute like this:
<td contenteditable>Whatever</td>
نصائح أخرى
If you do not want to do it manually, then you have to define an attribute
for the td
and then by css, you have to apply the content that you want by declaring an :after
or :before
class.
For instance, Here is the WORKING SOLUTION
The HTML:
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td title="abc"> </td>
<td title="def"> </td>
</tr>
</table>
The CSS:
td[title=abc]:after{content:"red"}
td[title=def]:after{content:"blue"}
I hope this is what you want.