form提交到HTML文档中的ASP中显示TEXT内容

来源:百度知道 编辑:UC知道 时间:2024/05/24 03:40:26
将一个表单
<form id="form1" name="form1" method="post" action="test.html">
<label>
<input type="text" name="a" />
</label>
<label>
<input type="submit" name="Submit" value="提交" />
</label>
</form>提交到test.html中并显示出来,
test.html中的代码!
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<%
dim c
c=request("a")
response.write(c)
%>
fdsa
<%=c%>
</body>
</html>
我不知道为什么,没有学过ASP请高手指教,谢谢,感激不尽!谢谢~~!

你的WEB SERVER可以让test.html解释ASP代码吗?
把文件名改成test.asp试试看

记得要在服务器里面打开ASP文件哦。

太菜了...我郁闷.
把文件保存为test.asp
这下面这个改为:
<form id="form1" name="form1" method="post" action="test.asp">

你的test.html是静态网页,无法处理从form提交过来的数据请求.

把你的test.html改成test.asp,同时把form中的html也改成.asp,然后确定你的asp环境已经搭建好了,这样应该就可以了.

test.html是静态网页,不支持动态输出,改成test.asp就好了