根据网上的一些脚本改的,大家看一下,应该对开发有用,准备在.Net下写个Server-Side端控件
把下面的代码另存为.htm文件后看下效果。
<HTML><HEAD>
<TITLE>数据表格</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<STYLE type=text/css>BODY {
FONT: 12px 细明体; CURSOR: default
}
TD {
FONT: 12px 细明体; CURSOR: default
}
.title {
BORDER-RIGHT: #555 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: #fff 1px solid; PADDING-LEFT: 4px; BACKGROUND: LightBlue; PADDING-BOTTOM: 4px; OVERFLOW: hidden; BORDER-LEFT: #fff 1px solid; CURSOR: hand; PADDING-TOP: 4px; BORDER-BOTTOM: #555 1px solid; WHITE-SPACE: nowrap
}
.cdata {
PADDING-RIGHT: 3px; BORDER-TOP: #fff 1px solid; PADDING-LEFT: 3px; PADDING-BOTTOM: 3px; OVERFLOW: hidden; PADDING-TOP: 3px; BORDER-BOTTOM: #ddd 1px solid; WHITE-SPACE: nowrap
}
.coolMenu
{
position: absolute;
height: 1px;
width: 1px;
font-size: 9pt;
background-color: menu;
border-top: 2px outset buttonhighlight;
border-left: 2px outset buttonhighlight;
border-bottom: 1px solid buttonshadow;
border-right: 1px solid buttonshadow;
visibility: hidden;
}
.coolMenu .coolMenuItem
{
height: 20px;
margin: 1px;
padding-right: 10px;
cursor: hand;
overflow: hidden;
}
.coolMenu .coolMenuItem IMG
{
vertical-align: middle;
margin-left: 1px;
margin-right: 6px;
}
.coolMenu .coolMenuItem .coolMenuMore
{
font-family: webdings;
}
.coolMenu .coolMenuDivider
{
border: 1px inset;
border-top-color: buttonshadow;
border-bottom-color: buttonhighlight;
height: 2px;
overflow: hidden;
margin-left: 2px;
margin-top: 2px;
margin-bottom: 2px;
}
.sinput
{
BORDER-BOTTOM: black 1px solid;
BORDER-LEFT: 0px;
BORDER-RIGHT: 0px;
BORDER-TOP: 0px;
FONT-FAMILY: 宋体,Arial;
FONT-SIZE: 9pt;
WIDTH: 15pt;
height: 12pt;
}
</STYLE>
<SCRIPT language=JavaScript>
// 栏位标题 ( 栏位名称 # 栏位宽度 # 资料对齐 #数据类型(主要分三种数据类型:文本、数值、日期))
var DataTitles=new Array(
"歌手 / 团体#90 #left#文本" ,
"专辑名称 #130#left#文本" ,
"发行公司 #110#left#文本" ,
"本周排名 #58 #center#数值",
"排名状况 #58 #center#文本",
"上周排名 #58 #center#数值",
"上榜周数 #58 #center#数值",
"最高名次 #58 #center#数值",
"销售百分比 #70 #center#数值",
"发行日期 #100 #right#日期"
)
// 栏位资料 ( 二维阵列 )
var DataFields=new Array()
DataFields[0] =new Array("萧亚轩萧亚轩萧亚轩萧亚轩萧亚轩萧亚轩萧亚轩萧亚轩" ,"爱的主打歌-吻" ,"维京 Virgin" ,"1" ,"持平" ,"1" ,"2","1" ,"2.9 %", "2004-1-1")
DataFields =new Array("张惠妹" ,"发烧" ,"华纳 Warner" ,"2" ,"持平" ,"2" ,"2","2" ,"2.1 %", "2004-2-10")
DataFields =new Array("陶