HTML DOM innerHTML Property
Complete TableCell Object Reference
Definition and Usage
The innerHTML property sets or returns the HTML between the start and end tags of
a table cell.
Syntax
tabledataObject.innerHTML=text
|
Example
The following example returns the inner HTML of a table cell:
<html>
<head>
<script type="text/javascript">
function alertInnerHTML()
{
alert(document.getElementById("td1").innerHTML);
}
</script>
</head>
<body>
<table border="1">
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td id="td1">Peter</td>
<td id="td1">Griffin</td>
</tr>
</table>
<br />
<input type="button" onclick=alertInnerHTML()
value="Alert innerHTML" />
</body>
</html>
|
Try-It-Yourself Demos
Return the inner HTML of a table cell
Complete TableCell Object Reference
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|