HTML DOM id Property
Complete TableRow Object Reference
Definition and Usage
The id property sets or returns the id of a table row.
Syntax
Example
The following example returns the id of a table row:
<html>
<head>
<script type="text/javascript">
function alertId()
{
alert(document.getElementById('tr1').id);
}
</script>
</head>
<body>
<table border="1">
<tr id="tr1">
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr id="tr2">
<td>Peter</td>
<td>Griffin</td>
</tr>
</table>
<br />
<input type="button" onclick="alertId()"
value="Alert table row ID" />
</body>
</html>
|
Try-It-Yourself Demos
Get the
id of a table row
Complete TableRow Object Reference
|
|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|