js insertCell colspan

I am generating html table dynamically by javascript.
I want to access colspan properties of table cell.
What can be the way to achieve this?

The code snippet is :-

Js代码  收藏代码
  1. for(i=0;i<parms.length-1;i++)  
  2. {  
  3. var GrpNames = parms[i].split(',');  
  4.   
  5. Row = window.tblvalue.insertRow();  
  6.   
  7. Row.style.width='100%';  
  8. Row.align="right";  
  9.   
  10. Cell = Row.insertCell();  
  11.   
  12. Cell.colspan=' 2 ' //This code doesnt work  
  13.   
  14. Cell.innerHTML="<a href='' style='Color:blue'  
  15. onclick='return  
  16. ShowCritGroupDetailList("+GrpNames[0]+")'>"+GrpNames[1]+"</  
  17. a>";  
  18.   
  19. Cell = Row.insertCell();  
  20.   
  21. Cell.innerHTML="<input type=checkbox name=chk_" + i +"  
  22. id="+GrpNames[0]+"; value='C'>";  
  23.   
  24.   
  25. }  

解答:
In case-sensitive javascript it is important to use the correct
sequence of upper and lower case letters in property names. In this
case the 'S' in 'span' should be a capital.

Js代码  收藏代码
  1. Cell.colSpan = 2;  


(and the expectation would be that the value assigned should be
numeric and not a string.)

有话要说