| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 832 人关注过本帖
标题:asp怎么传递参数传递
只看楼主 加入收藏
freebirdbo
Rank: 1
等 级:新手上路
帖 子:256
专家分:0
注 册:2005-3-27
收藏
 问题点数:0 回复次数:4 
asp怎么传递参数传递
这个是input.htm
<html>
<body>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<p align="center">输入用户信息</p>
<form method="POST" action="showinfo.asp" name="input">
<div align="center">
<center>
<table border="1" width="46%">
<tr>
<td width="25%" align="center">用户名:</td>
<td width="75%" align="left"><input type="text" name="userid" size="20"></td>
</tr>
<tr>
<td width="50%" align="center">用户密码:</td>
<td width="75%" align="left"><input type="password" name="pwd" size="20"></td>
</tr>
<tr>
<td width="50%" align="center">确认密码:</td>
<td width="75%" align="left"><input type="password" name="pwd2" size="20"></td>
</tr>
<tr>
<td width="50%" align="center">性别:</td>
<td width="75%" align="left"><input type="radio" value="男" checked name="R1">男&nbsp;
<input type="radio" name="R1" value="女">女</td>
</tr>
<tr>
<td width="50%" align="center">所在城市:</td>
<td width="75%" align="left"><select size="1" name="location">
<option selected value="北京">北京</option>
<option value="上海">上海</option>
<option value="天津">天津</option>
<option value="重庆">重庆</option>
<option value="其他">其他</option>
</select></td>
</tr>
<tr>
<td width="50%" align="center">兴趣爱好:</td>
<td width="75%" align="left"><input type="checkbox" name="C1" value="ON">文艺&nbsp;
<input type="checkbox" name="C2" value="ON">体育&nbsp; <input type="checkbox" name="C3" value="ON">电脑</td>
</tr>
<tr>
<td width="50%" align="center">自我介绍:</td>
<td width="75%" align="left"><textarea rows="5" name="S1" cols="36"></textarea></td>
</tr>
</table>
</center>
</div>
<p align="center"><input type="submit" value="提交" name="B1">
<input type="reset" value="全部重写" name="B2"></p>
</form>
<p align="center"> </p>
</body>
</html>
这个是 showinfo.asp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
读取表单数据
<p>
<%
function replacebr(ByVal mystr)
replacebr=replace(mystr,chr(13),"<br>")
end function
%>
用户名: <%=request.form("userid")%><br>
密码:<%=request.form("pwd")%><br>
确定密码:<%=request.form("pwd2")%><br>
性别:<%=request.form("R1")%><br>
所在城市:<%=request.form("location")%><br>
兴趣爱好:
<%
if request.form("c1")="on" then
response.write "文艺"
end if
if request.form("c2")="on" then
response.write "体育"
end if
if request.form("c1")="on" then
response.write "电脑"
end if
%> <br>
自我介绍:
<%=replacebr(request.form("s1")%>
</body>
</html>
GG,JJ们帮我看一下,input.htm 表单的提交的内容怎么不能在 showinfo.asp里显示啊?
搜索更多相关主题的帖子: 参数 asp 
2006-07-23 20:47
freebirdbo
Rank: 1
等 级:新手上路
帖 子:256
专家分:0
注 册:2005-3-27
收藏
得分:0 

兄弟们帮我看一下啊?

2006-07-23 23:04
janefishfish
Rank: 1
等 级:新手上路
帖 子:50
专家分:0
注 册:2006-6-24
收藏
得分:0 
好简单````将showinfo.asp的内容改改,请不要这么粗心
if trim(request.form("C1"))="ON" then
response.write "文艺"
end if
if trim(request.form("C2"))="ON" then
response.write "体育"
end if
if trim(request.form("C3"))="ON" then
response.write "电脑"
end if

2006-07-25 10:32
jnzsk
Rank: 1
等 级:新手上路
威 望:1
帖 子:403
专家分:0
注 册:2004-11-13
收藏
得分:0 
你试一下楼上的代码吧!

[此贴子已经被作者于2006-7-25 14:37:58编辑过]


2006-07-25 14:36
freebirdbo
Rank: 1
等 级:新手上路
帖 子:256
专家分:0
注 册:2005-3-27
收藏
得分:0 

谢谢

2006-07-27 10:29
快速回复:asp怎么传递参数传递
数据加载中...
 
   



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

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