| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 467 人关注过本帖
标题:菜鸟求助:这是为什么?
只看楼主 加入收藏
vfp00
Rank: 1
等 级:新手上路
帖 子:241
专家分:0
注 册:2006-2-20
收藏
 问题点数:0 回复次数:2 
菜鸟求助:这是为什么?

图片附件: 游客没有浏览图片的权限,请 登录注册

请大家帮忙看下为什么“畅销书排行榜”表头不能与左侧的“文学哲学”热键显示在一条水平线上,我在frontpage中是可以看到能在一条线上输出的:代码如下:
default.asp代码:

<html>
<head>
<title>购书天堂</title>
<meta http-equiv = "content-type" content = "text/html;charset=gb2312">
</head>

<body bgcolor = "#ffffff">
<%
dim weekday,today
today = formatdatetime(now(),1)&formatedatetime(now(),3)

response.write now()&"<br>"

'today = weekday(date())
'问题2:请大家帮忙看下,为什么我用上面这句,系统总会出错,说参数有问题,换成today =weekday(now())也是出同样的错。
select case 1
case 1 weekdays = "星期一"
case 2 weekdays = "星期二"
case 3 weekdays = "星期三"
case 4 weekdays = "星期四"
case 5 weekdays = "星期五"
case 6 weekdays = "星期六"
case 7 weekdays = "星期天"
end select
'weekdays = "星期一"

set cn = server.createobject("adodb.connection")
cn.open "driver={sql server};database=bookstore;server=sancom-ho\sqlsrv;uid=sa;pwd=goto/6533"
set rs = server.createobject("adodb.recordset")
%>
<table width = "720" border = "0" cellpadding = "1" cellspacing = "0">
<tr>
<td height = "10" colspan = "3">
<table width = "100%" border = "0">
<h1>欢迎光临购书天堂</h1>
</table>
</td>
</tr>
<tr>
<td height = "16" colspan = "3" bgcolor = "#ffffff">
<tr>
<td width = "11%" height = "13" ><b>书店首页</b></td>
<td width = "10%" height = "13"><a href="last.asp">最新图书</a></td>
<td width = "10%" height = "13"><a href="recomment.asp">推荐图书</a></td>
<td colspan = "3" height = "13">现在是&nbsp;<%response.write today&"&nbsp;"&weekdays%></td>
<td width = "10%" height = "13"><a href="guestbook.asp">留言薄</a></td>
<td height = "13" width = "10%" align = "center"><a href = "mailto:1086@263.net">联系我们</a></td>
<td colspan = "2" height = "13" width = "10%" align = "center"><a href = "register.asp">注册</a></td>
</tr>
</table>
<table>
<tr>
<!--59-->
<td height = "558" width = "116" align = "top" rowspan = "5"><!--#include file="left.inc"--></td>
<td height = "558" width = "20" bgcolor = "#ff0000" rowspan = "5">as</td>
<td height = "114" width = "598" valign = "top">
<table width = "100%" border = "0" cellpadding = "2" cellspacing = "2">
<tr>
<td colspan = "7"><b>畅销图书排行榜</b></td>
</tr>
<%
rs.open "select top 10 * from books where remaincount <> 0 order by sums-remaincount desc",cn,3
%>
<tr bgcolor = "#6699cc">
<td height = "35" colspan = "7">
<table width = "100%" border = "0" bgcolor = "#ffffff">
<tr>
<td width = "8%" align = "center">编号</td>
<td width = "32%" align = "center">书名</td>
<td width = "15%" align = "center">单价</td>
<td width = "12%" align = "center">日期</td>
<td width = "12%" align = "center">售出数量</td>
<td width = "14%" align = "center">图书类型</td>
<td width = "7%" align = "center">购买</td>
</tr>
<tr bgcolor = "#6699cc">
<td colspan = "7" height = "1"></td>
</tr>
<%
do while not rs.eof
%>
<tr>
<td width = "8%" align = "center"><%=rs("book_id")%></td>
<td width = "32%" align = "center"><a href="introduce.asp?book_id =<%=rs("book_name")%>"><%=rs("book_name")%></a></td>
<td width = "15%" align = "center"><%=rs("price")%></td>
<td width = "12%" align = "center"><%=formatdatetime(rs("dates"),2)%></td>
<td width = "12%" align = "center"><%=rs("sums")-rs("remaincount")%></td>
<td width = "14%" align = "center"><%=rs("types")%></td>
<td width = "7%" align = "center"><a href ="#" onclick = "window.open('bookbag.asp?action=select&book_id=<%=rs("book_id")%>','select','width=500,height=400')">购买</a></td>
</tr>
<%
if not rs.eof then rs.movenext
loop
%>
</table>
<%
rs.close
%>
</td></tr>
<tr>
<td height = "2" width = "598" valign = "top" bgcolor = "#6699cc"></td>
</tr>
<tr>
<td height = "114" width = "598" valign = "top">
<table width = "100%" border = "0" cellpadding = "2" cellspacing = "2" height="389">
<tr>
<td colspan = "7" height="18"><b>本日推荐图书</b></td>
</tr>
<%
rs.open "select top 10 * from books where remaincount <> 0 and recomment = 1 order by book_id",cn,3
%>
<tr bgcolor = "#6699cc">
<td height = "102" colspan = "7">
<table width = "100%" border = "0" bgcolor = "#ffffff">
<tr>
<td width = "8%" align = "center">编号</td>
<td width = "32%" align = "center">书名</td>
<td width = "15%" align = "center">单价</td>
<td width = "12%" align = "center">日期</td>
<td width = "12%" align = "center">售出数量</td>
<td width = "14%" align = "center">图书类型</td>
<td width = "7%" align = "center">购买</td>
</tr>
<tr bgcolor = "#6699cc">
<td colspan = "7" height = "1"></td>
</tr>
<%
do while not rs.eof
%>
<tr>
<td width = "8%" align = "center"><%=rs("book_id")%></td>
<td width = "32%" align = "center"><a href="introduce.asp?book_id =<%=rs("book_name")%>"><%=rs("book_name")%></a></td>
<td width = "15%" align = "center"><%=rs("price")%></td>
<td width = "12%" align = "center"><%=formatdatetime(rs("dates"),2)%></td>
<td width = "12%" align = "center"><%=rs("sums")-rs("remaincount")%></td>
<td width = "14%" align = "center"><%=rs("types")%></td>
<td width = "7%" align = "center"><a href ="#" onclick = "window.open('bookbag.asp?action=buy&book_id = <%=rs("book_id")%>','select','width=500,height=400')">购买</a></td>
</tr>
<%
if not rs.eof then rs.movenext
loop
%>
</table>
<%
rs.close
%>
</td></tr>
<tr>
<td height = "17" width = "598" valign = "top" bgcolor = "#6699cc"></td>
</tr>
<tr>
<td height="228" width = "598" valign = "top">
<table width = "100%" border = "0" cellpadding = "2" cellsapcing = "2">
<tr>
<td colspan = "7"><b>最新图书</b></td>
</tr>
<%
rs.open "select top 10 * from books where remaincount <> 0 order by book_id desc",cn,3
%>
<tr bgcolor = "#6699cc">
<td height = "35" colspan = "7">
<table width = "100%" border = "0" bgcolor = "#ffffff">
<tr>
<td width = "8%" align = "center">编号</td>
<td width = "32%" align = "center">书名</td>
<td width = "15%" align = "center">单价</td>
<td width = "12%" align = "center">日期</td>
<td width = "12%" align = "center">售出数量</td>
<td width = "14%" align = "center">图书类型</td>
<td width = "7%" align = "center">购买</td>
</tr>
<tr bgcolor = "#6699cc">
<td colspan = "7" height = "1"></td>
</tr>
<%
do while not rs.eof
%>
<tr>
<td width = "8%" align = "center"><%=rs("book_id")%></td>
<td width = "32%" align = "center"><a href="introduce.asp?book_id =<%=rs("book_name")%>"><%=rs("book_name")%></a></td>
<td width = "15%" align = "center"><%=rs("price")%></td>
<td width = "12%" align = "center"><%=formatdatetime(rs("dates"),2)%></td>
<td width = "12%" align = "center"><%=rs("sums")-rs("remaincount")%></td>
<td width = "14%" align = "center"><%=rs("types")%></td>
<td width = "7%" align = "center"><a href ="#" onclick =" window.open('bookbag.asp?action=buy&book_id = <%=rs("book_id")%>','select','width=500,height=400')">购买</a></td>
</tr>
<%
if not rs.eof then rs.movenext
loop
%>
</table>
<%
rs.close
%>
<hr>
<p align = "center"><i>copyright&copy;2000-2001 购书天堂 版权所有 </i></p>
<p align = "center"><i>powered by <a href = "mailto:1086@263.。et">san</a></i></p>
</table>
</body>




2006-02-20 16:47
yms123
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:209
帖 子:12488
专家分:19042
注 册:2004-7-17
收藏
得分:0 
你用的iframe?还是嵌套了表单?
2006-02-20 17:57
binyanmei
Rank: 1
等 级:新手上路
帖 子:93
专家分:0
注 册:2005-12-20
收藏
得分:0 
<tr>
<!--59-->
<td height = "558" width = "116" align = "top" rowspan = "5"><!--#include file="left.inc"--></td>
<td height = "558" width = "20" bgcolor = "#ff0000" rowspan = "5">as</td>
<td height = "114" width = "598" valign = "top">
<table width = "100%" border = "0" cellpadding = "2" cellspacing = "2">
<tr>
<td colspan = "7"><b>畅销图书排行榜</b></td>
</tr>
这样是敢定不在一条直线上的。
2006-02-20 21:48
快速回复:菜鸟求助:这是为什么?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.030225 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved