我写了一段代码,有个地方错了,但我不知道怎么该,同志们帮帮忙

huoshang4408 2006-06-13 09:37:09
<%
dim i
i=1
do while not i>100
xuhao=request.xuanze("xuhao '& i &'")
gxmc=request.xuanze("gxmc'&i&'")
gj=request.xuanze("gj'&i&'")
xxuhao=request.xuanze("xxuhao'&i&'")
xgxmc=request.xuanze("xgxmc'&i&'")
response.write xuhao
response.write gxmc
response.write gj
response.write xxuhao
response.write xgxmc
response.write"<br>"
i=i+1
loop

%>

肯定是这里错了("xuhao '& i &'"),但我又不知道该怎么写
...全文
430 23 打赏 收藏 转发到动态 举报
写回复
用AI写文章
23 条回复
切换为时间正序
请发表友善的回复…
发表回复
huoshang4408 2006-06-14
  • 打赏
  • 举报
回复
大功告成 ,真是不容易,感谢大家的帮助!
顿感天高云阔啊
now123 2006-06-14
  • 打赏
  • 举报
回复
("xuhao '& i &'"),
---->
("xuhao" & i),

huoshang4408 2006-06-13
  • 打赏
  • 举报
回复
不行啊,什么也没有,得到的是一个空白页,源文件是100个<br>
Agulado 2006-06-13
  • 打赏
  • 举报
回复
xuhao=request.xuanze("xuhao '& i &'")
============
不应该有',xuhao=request.form("xuhao" & i)
singsin 2006-06-13
  • 打赏
  • 举报
回复
request.form("xuhao"&i)
huoshang4408 2006-06-13
  • 打赏
  • 举报
回复
提取的对象是xuhao1到xuhao100,gxmc1到gxmc100 ………………
huoshang4408 2006-06-13
  • 打赏
  • 举报
回复
可是我写了还是什么都没有啊,
Agulado 2006-06-13
  • 打赏
  • 举报
回复
我把form的名字改成xuanze了,所以应该是这样的吧

===========
不是。还是request.form
lolo2006 2006-06-13
  • 打赏
  • 举报
回复
倒,先去看看asp的技术手册吧
huoshang4408 2006-06-13
  • 打赏
  • 举报
回复
<form name="xuanze" method="post" action="qurengx.asp" enctype="multipart/form-data">
huoshang4408 2006-06-13
  • 打赏
  • 举报
回复
我把form的名字改成xuanze了,所以应该是这样的吧
TaoTaoYou 2006-06-13
  • 打赏
  • 举报
回复
我倒,不是吧兄弟,,request.xuanze是个什么东东,,你换这样试试request.form
huoshang4408 2006-06-13
  • 打赏
  • 举报
回复
from 的名称,写不写都无所谓,应该是吧
lolo2006 2006-06-13
  • 打赏
  • 举报
回复
request.xuanze?
huoshang4408 2006-06-13
  • 打赏
  • 举报
回复
有点进展,呵呵,不写就出来了,可是会丢数据,有的显不出来
Agulado 2006-06-13
  • 打赏
  • 举报
回复
enctype="multipart/form-data"

============
表单的enctypy=""或不写
Agulado 2006-06-13
  • 打赏
  • 举报
回复
lz你表单里的input的name,也是xuhao1到xuhao100吗?
huoshang4408 2006-06-13
  • 打赏
  • 举报
回复
我不写变量也不行啊,以下是提交页面的主要代码

<form action="qurengx.asp" method="post" enctype="multipart/form-data" name="xuanze">

<%
dim i
i=1
do while not i>100
%>
<tr>
<td>
<%=i %>
</td>
<td>
<input name="xuhao<%=i %>" type="text" id="xuhao<%=i %>" size="5" maxlength="6">
<input name="Submit<%=i %>" type="button" id="Submit<%=i %>" onClick="javascript:window.open('Admin_gxSelect.asp?UrlID=<%=i %>', 'selupfile', 'width=800, height=600, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=yes');" value="选择">
</td>
<td>
<input name="gxmc<%=i %>" type="text" id="gxmc<%=i %>" size="20">
</td>
<td>
<input name="gj<%=i %>" type="text" id="gj<%=i %>" size="6">
</td>
<td>
<input name="xxuhao<%=i %>" type="text" id="xxuhao<%=i %>" size="6">
<input name="xSubmit<%=i %>" type="button" id="xSubmit<%=i %>" onclick="javascript:window.open('Admin_xgxSelect.asp?UrlID=<%=i %>', 'selupfile', 'width=800, height=600, toolbar=no, menubar=no, scrollbars=yes, resizable=no, location=no, status=yes');" value="选择">
</td>
<td>
<input name="xgxmc<%=i %>" type="text" id="xgxmc<%=i %>" size="20">
</td>
</tr>

<%
i=i+1
loop

%>


<tr>
<td width="200">
<input type="submit" name="Submit" value="提 交">
<input type="reset" name="Submit2" value="重 设">
</td>
</tr>
</form>


后来我把后面的写成下面这个了也不行
<%
xuhao=request("xuhao1")
gxmc=request("gxmc1")
gj=request("gj1'")
xxuhao=request("xxuhao1")
xgxmc=request("xgxmc1")
response.write xuhao
response.write gxmc
response.write gj
response.write xxuhao
response.write xgxmc
response.write"<br>"

%>
Agulado 2006-06-13
  • 打赏
  • 举报
回复
request.form()括号里不可以用变量。。否则无法识别。。。他会默认为无此记录。
我以前也碰到过此类似的。。。你只有通过其他途径。。。

==============
不可能
北京不不 2006-06-13
  • 打赏
  • 举报
回复
request.form()括号里不可以用变量。。否则无法识别。。。他会默认为无此记录。
我以前也碰到过此类似的。。。你只有通过其他途径。。。
加载更多回复(3)

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧