这个是参照的例子:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>1111</title> <style>
.relativeTag
{
position:relative;
}; .fixCol
{
background-color:#cccccc;
position:relative;
left:expression(this.parentElement.offsetParent.scrollLeft);
};
.mainDiv
{
overflow:auto;
}
</style>
</head>
<body>
<div class="mainDiv" style="width:200px;height:150px;">
<table width="100%" border=1 cellspacing=0 >
<TR class="relativeTag" >
<TD class="fixCol" width="100" nowrap>Header A</TD>
<TD width="100" nowrap>Header B</TD>
<TD width="100" nowrap>Header C</TD>
</TR>
<TR class="relativeTag" >
<TD class="fixCol" >A</TD>
<TD>B</TD>
<TD>C</TD>
</TR>
</table>
</div>
</body>
</html> =================================================我遇到的问题是先生成html,如下所示,然后在用javascipt把这些style效果放上去,请问怎么写?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>1111</title> </head>
<body>
<div id="divInfo">
<table width="100%" border=1 cellspacing=0 >
<TR>
<TD>Header A</TD>
<TD>Header B</TD>
<TD>Header C</TD>
</TR>
<TR>
<TD>A</TD>
<TD>B</TD>
<TD>C</TD>
</TR>
</table>
</div>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>1111</title> <style>
.relativeTag
{
position:relative;
}; .fixCol
{
background-color:#cccccc;
position:relative;
left:expression(this.parentElement.offsetParent.scrollLeft);
};
.mainDiv
{
overflow:auto;
}
</style>
</head>
<body>
<div class="mainDiv" style="width:200px;height:150px;">
<table width="100%" border=1 cellspacing=0 >
<TR class="relativeTag" >
<TD class="fixCol" width="100" nowrap>Header A</TD>
<TD width="100" nowrap>Header B</TD>
<TD width="100" nowrap>Header C</TD>
</TR>
<TR class="relativeTag" >
<TD class="fixCol" >A</TD>
<TD>B</TD>
<TD>C</TD>
</TR>
</table>
</div>
</body>
</html> =================================================我遇到的问题是先生成html,如下所示,然后在用javascipt把这些style效果放上去,请问怎么写?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>1111</title> </head>
<body>
<div id="divInfo">
<table width="100%" border=1 cellspacing=0 >
<TR>
<TD>Header A</TD>
<TD>Header B</TD>
<TD>Header C</TD>
</TR>
<TR>
<TD>A</TD>
<TD>B</TD>
<TD>C</TD>
</TR>
</table>
</div>
</body>
</html>
解决方案 »
- 如何查找excel文件中所有的sheet到一个DataSet?
- 网页显示布局问题。求助!
- 错误“因值类型不匹配而未能从程序集”????
- 登录问题
- 有办法在URL里面控制target吗?
- 过来看看 你或许收获不小----我的xml实现通用报表的打印
- asp.net2.0从外部插入代码到FCKeditor的问题
- 这个php代码 asp.net 怎么写?
- asp.net(VB)如何获取浏览者的MAC地址
- 能将requiredFieldValidator的errorMessage在页面load后就显示错误信息,而不是提交或按tab才显示?可以吗?
- regex判断有疑问?
- ajax 里面使用RegisterClientScriptBlock 调用前台函数???
用 JQuery的 slideUp 或是 slideDown 函数就可以了