Normally we specify colspan attribute for <td> tag.
For example
<table>
<tr>
<td colspan=”2”>QualityPointTechnologies </td>
</tr>
</table>
We can create the above design using javascript in a following way
<script language=”javascript”>
table = document.createElement(“table”);
row = document.createElement(“tr”);
cell = document.createElement(“td”);
cell.colSpan=”2”; // colSpan specify ‘S’ as capital letter other wise it won’t work
cell.innerHTML=” QualityPointTechnologies”;
row.appendChild(“cell”);
table.appendChild(“row”);
</script>
We should specify the "S" in Upper case in the colspan, otherwise it won't work.
More Articles...
1 comment:
Thanks, some great tips, I have such a long way to go with HTML...
Post a Comment