1
string script="<script language=javascript>";
2
newRow = "newRow = document.getElementById('TAB_VIEW').insertRow();";
3
newCell = "newCell = newRow.insertCell();";
4
color = "newCell.style.backgroundColor=\""+c+"\";";
5
content = "newCell.innerHTML =\""+s.Replace("\r\n","\\r\\n")+"\";";
6
alig = "newCell.style.align=\""+a+"\";";//功能没有实现
7
height = "newCell.style.height=\""+h+"\";";
8
script+=newRow+newCell+content+color+alig+height+"</script>";
9
Page.RegisterStartupScript("key3",script);
10
其中第6行 alig = "newCell.style.align=\""+a+"\";"; 没有实现功能
string script="<script language=javascript>";2
newRow = "newRow = document.getElementById('TAB_VIEW').insertRow();";3
newCell = "newCell = newRow.insertCell();";4
color = "newCell.style.backgroundColor=\""+c+"\";";5
content = "newCell.innerHTML =\""+s.Replace("\r\n","\\r\\n")+"\";";6
alig = "newCell.style.align=\""+a+"\";";//功能没有实现7
height = "newCell.style.height=\""+h+"\";";8
script+=newRow+newCell+content+color+alig+height+"</script>";9
Page.RegisterStartupScript("key3",script);10

newCell.style.backgroundColor=
newCell.style.height=
这两句都行,为什么newCell.style.align=这样表示不行?
请高手指点

先对每一个看我问题的表示感谢!
浙公网安备 33010602011771号