Response.ContentType = "application/ms-download"
Response.AddHeader "content-disposition", "attachmentfilename=Linksilicon-" &date() &"-" &hour(time) &"-" &Minute(time) &"-" &second(time) &".xls"
do while not rs.eof
%>
你要生成的HTML表格就把他写在这里面
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
%>
上面的代码应该有错误,没时间给你仔细分析哈 Response.AddHeader "content-disposition", "attachmentfilename=cc-" &date() &"-" &hour(time) &"-" &Minute(time) &"-" &second(time) &".xls"这个地方就是生成XLS 他生成出来就应该是是cc-年月日时分秒.xls
你将Email protocols 这个元素给左浮动,加个大小,然后右边的there are server...这个元素给右浮动,加个大小,两个框的的宽度总和要小于父级的宽度的总和就可以了代码如下:
<style>
*{
margin:0px
padding:0px
}
.cont{
width:900px
margin:0 auto
}
.left{
float:left
width:198px
border:1px solid #f00
}
.right{
float:left
width:698px
border:1px solid #000
}
</style>
<div class="cont">
<div class="left"><h1>Email protocols </h1></div>
<div class="right"><h2>there are server </h2></div>
</div>
float: left是左浮动的意思,但是为什么变成图3的效果需要看你的html源码。至于图2的效果,正解是<style>.clear:after{content: '', clear: both}/*用来清除浮动效果*/</style>
<div class="clear">
<h2 style="float: leftwidth: 6cm">Email Protocols</h2>
<div style="float: leftmargin-left: 6.5cm">
<p>There are ...</p>
<ul>
<li>....</li>
</ul>
</div>
</div>