日期:2014-05-16 浏览次数:20524 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<script type="text/javascript">
var cols=['红','绿'];
var sizs=['33','35'];
var oh="<table border=\"1\">";
for(var i=0;i<cols.length;i++){
oh+="<tr>";
oh+="<td rowspan=\""+sizs.length+"\">"+cols[i]+"</td>";
for(var j=0;j<sizs.length;j++){
oh+="<td>"+sizs[j]+"</td>";
if(j<sizs.length-1) oh+="</tr><tr>"
}
oh+="</tr>";
}
oh+="</table>";
document.write(oh);
</script>
</body>
</html>