首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

!关于Response.Write输出位置的有关问题,送分!

2012-02-03 
求助!!!!关于Response.Write输出位置的问题,送分!!我要的数据怎么老输出到顶端呢?前面指定了位置了啊,代码

求助!!!!关于Response.Write输出位置的问题,送分!!
我要的数据怎么老输出到顶端呢?前面指定了位置了啊,代码如下:
table   border= "1 "   id= "table1 "   height= "370 "   width= "483 ">
        <tr>
            <td   rowspan= "6 "   width= "92 ">
            <p   align= "center "> <font   size= "6 "> 中国 </font> </td>
            <td   width= "125 "   height= "30 ">            
            <p   align= "center "> <font   size= "5 "> 北京 </font> </td>
            <td   height= "30 "> <%=a%>

        <tr>
            <td   rowspan= "6 "   width= "92 ">
            <p   align= "center "> <font   size= "6 "> 中国 </font> </td>
            <td   width= "125 "   height= "30 ">
            <p   align= "center "> <font   size= "5 "> 上海 </font> </td>
            <td   height= "30 "> <%=b%>
<%  
                Do   while   (Not   rs.eof)
                  if   rs( "diming ")=“北京”then
                    a=rs( "xiaoliang ")
                    Response.Write   a
                  elseif   rs( "diming ")=“上海”then
                    b=rs( "xiaoliang ")
                    Response.Write   b
                  end   if
数据可以读出显示,但是位于页面最顶端而不是我要的表格内,请问该怎么改?急!!!!!

[解决办法]
<table border= "1 " id= "table1 " height= "370 " width= "483 ">
<%
Do while (Not rs.eof)
if rs( "diming ")=“北京”then
a=rs( "xiaoliang ")
elseif rs( "diming ")=“上海”then
b=rs( "xiaoliang ")
end If
%>
<tr>
<td rowspan= "6 " width= "92 ">
<p align= "center "> <font size= "6 "> 中国 </font> </td>
<td width= "125 " height= "30 ">
<p align= "center "> <font size= "5 "> 北京 </font> </td>
<td height= "30 "> <%=a%> </td>
</tr>

<tr>
<td rowspan= "6 " width= "92 ">
<p align= "center "> <font size= "6 "> 中国 </font> </td>
<td width= "125 " height= "30 ">
<p align= "center "> <font size= "5 "> 上海 </font> </td>


<td height= "30 "> <%=b%> </td>
</tr>
<%
Loop
%>
</table>
[解决办法]
楼猪,你试试这段代码怎么样,这样应该是对的
<%
Do while (Not rs.eof)
if rs( "diming ")= "北京 "then
a=rs( "xiaoliang ")
elseif rs( "diming ")= "上海 "then
b=rs( "xiaoliang ")
end if
%>
<table border= "1 " id= "table1 " height= "370 " width= "483 ">
<tr>
<td rowspan= "6 " width= "92 ">
<p align= "center "> <font size= "6 "> 中国 </font> </td>
<td width= "125 " height= "30 ">
<p align= "center "> <font size= "5 "> 北京 </font> </td>
<td height= "30 "> <%=a%> </td>
</tr>
<tr>
<td rowspan= "6 " width= "92 ">
<p align= "center "> <font size= "6 "> 中国 </font> </td>
<td width= "125 " height= "30 ">
<p align= "center "> <font size= "5 "> 上海 </font> </td>
<td height= "30 "> <%=b%> </td>
</tr>
</table>
<%rs.movenext
loop%>
[解决办法]
我上面顺序放错了~
<table border= "1 " id= "table1 " height= "370 " width= "483 ">
<%
Do while (Not rs.eof)
if rs( "diming ")=“北京”then
a=rs( "xiaoliang ")
elseif rs( "diming ")=“上海”then
b=rs( "xiaoliang ")
end if
%>

<tr>
<td rowspan= "6 " width= "92 ">
<p align= "center "> <font size= "6 "> 中国 </font> </td>
<td width= "125 " height= "30 ">
<p align= "center "> <font size= "5 "> 北京 </font> </td>
<td height= "30 "> <%=a%> </td>
</tr>
<tr>
<td rowspan= "6 " width= "92 ">
<p align= "center "> <font size= "6 "> 中国 </font> </td>
<td width= "125 " height= "30 ">
<p align= "center "> <font size= "5 "> 上海 </font> </td>
<td height= "30 "> <%=b%> </td>
</tr>

热点排行