<!DOCTYPE html>function setColSpan(){var x=document.getElementById('myTable').rows[0].cells;x[0].colSpan="2";x[1].colSpan="6";}id="myTable" border="1"colspan="4"cell 1colspan="4"cell 2cell 3cell 4cell 5cell 6cell 7cell 8cell 9cell 10type="button" onclick="setColSpan()" value="Change colspan"