Form提交问题,帮忙改改,谢谢!

Caobiao 2005-10-18 11:19:54
代码如下:

--------------------------------------------------------------------------------


<%@LANGUAGE="VBSCRIPT" CODEPAGE="CP_ACP"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<% if Request.Form("usn")="" or Request.Form("psw")="" then %>
<form name="form1" method="post" action="login.asp">
用户名:
<input type="text" name="usn">
<br>
密   码:
<input type="password" name="psw">
<br>
<input type="submit" name="Submit" value="提交">
</form>
<%Else%>
<a>您刚才输入的用户名和密码为:<%=Request.Form("usn")%>,<%=Request.Form("psw")%></a>
<%End if%>
</body>
</html>

--------------------------------------------------------------------------------


运行结果:

无法显示网页
试图访问的网页出现问题,无法显示。

请尝试执行下列操作:

单击刷新按钮,或稍后重试。

打开 localhost 主页,然后查找与所需信息相关的链接。
HTTP 错误 500.100 - 内部服务器错误 - ASP 错误
Internet 信息服务
技术信息(用于支持人员)

错误类型:
Active Server Pages, ASP 0203 (0x80004005)
指定的代码页特性无效。
/login.asp, 第 1 行


浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)

网页:
GET /login.asp

时间:
2005年10月18日, 上午 11:19:00


详细信息:
Microsoft 支持

...全文
75 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
GoodyeahApple 2005-10-18
  • 打赏
  • 举报
回复
Request.Form不要改成Request.Form1,改了就语法错误了
xxsoft 2005-10-18
  • 打赏
  • 举报
回复
有点小错误。。请复制以下代码

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<% if Request.Form("usn")="" or Request.Form("psw")="" then %>
<form name="form1" method="post" action="">
用户名:
<input type="text" name="usn">
<br>
密   码:
<input type="password" name="psw">
<br>
<input type="submit" name="Submit" value="提交">
</form>
<%Else%>
<a>您刚才输入的用户名和密码为:<%=Request.Form("usn")%>,<%=Request.Form("psw")%></a>
<%End if%>
</body>
</html>
Caobiao 2005-10-18
  • 打赏
  • 举报
回复
行了,谢谢!
xxsoft 2005-10-18
  • 打赏
  • 举报
回复
以下代码无错,把第一行去掉就行了


<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<% if Request.Form("usn")="" or Request.Form("psw")="" then %>
<form name="form1" method="post" action="login.asp">
用户名:
<input type="text" name="usn">
<br>
密   码:
<input type="password" name="psw">
<br>
<input type="submit" name="Submit" value="提交">
</form>
<%Else%>
<a>您刚才输入的用户名和密码为:<%=Request.Form("usn")%>,<%=Request.Form("psw")%></a>
<%End if%>
</body>
</html>
Caobiao 2005-10-18
  • 打赏
  • 举报
回复
请问Request.Form要不要改成Request.Form1?
Caobiao 2005-10-18
  • 打赏
  • 举报
回复
还是不行
Caobiao 2005-10-18
  • 打赏
  • 举报
回复
不知道,我用DW向导生成的:),试试看,谢谢@!@
GoodyeahApple 2005-10-18
  • 打赏
  • 举报
回复
CODEPAGE="CP_ACP"改成CODEPAGE="936"
meizz 2005-10-18
  • 打赏
  • 举报
回复
<%@LANGUAGE="VBSCRIPT" CODEPAGE="CP_ACP"%>
CP_ACP 这是什么东东? 你把它改成 936 试试

28,390

社区成员

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

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