ASP获取表单信息
index.html的源代码:<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3...
index.html的源代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>表单</title>
</head>
<body>
<form action="list.asp" method="post">
姓名:<input type="text" name="yourname"><p>
密码:<input type="password" name="yourpw"><p>
性别 <input type="radio" name="sex" value="男">男
<input type="radio" name="sex" value="女">女<p>
兴趣爱好 <input type="checkbox" name="fav" value="体育">体育
<input type="checkbox" name="fav" value="音乐">音乐
<input type="checkbox" name="fav" value="美术">美术
<input type="checkbox" name="fav" value="看书">看书<br>
个人简介
<textarea name="intro" rows="5"></textarea><p>
城市:<select name="add" size="1" onchange="fun()">
<option value="北京">北京</option>
<option value="陕西">陕西</option>
<option value="西安">西安</option>
<option value="山东">山东</option>
<option value="山西">山西</option>
</select><p>
<input type="submit" value="提交">
<input type="reset" value="重置">
</form>
</body>
</html>
list.asp的源代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>表单</title>
</head>
<body>
<%@ language="Javascript"%>
<%
var a=request("yourname")
var b=request("yourpw")
var c=request("sex")
var d=request("fav")
var e=request("intro")
var f=request("add")
response.write("姓名是"+a);
response.write("密码是"+b);
response.write("性别是"+c);
response.write("兴趣爱好是"+d);
response.write("个人简介是"+e);
response.write("城市是"+f);
%>
</body>
</html> 展开
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>表单</title>
</head>
<body>
<form action="list.asp" method="post">
姓名:<input type="text" name="yourname"><p>
密码:<input type="password" name="yourpw"><p>
性别 <input type="radio" name="sex" value="男">男
<input type="radio" name="sex" value="女">女<p>
兴趣爱好 <input type="checkbox" name="fav" value="体育">体育
<input type="checkbox" name="fav" value="音乐">音乐
<input type="checkbox" name="fav" value="美术">美术
<input type="checkbox" name="fav" value="看书">看书<br>
个人简介
<textarea name="intro" rows="5"></textarea><p>
城市:<select name="add" size="1" onchange="fun()">
<option value="北京">北京</option>
<option value="陕西">陕西</option>
<option value="西安">西安</option>
<option value="山东">山东</option>
<option value="山西">山西</option>
</select><p>
<input type="submit" value="提交">
<input type="reset" value="重置">
</form>
</body>
</html>
list.asp的源代码:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>表单</title>
</head>
<body>
<%@ language="Javascript"%>
<%
var a=request("yourname")
var b=request("yourpw")
var c=request("sex")
var d=request("fav")
var e=request("intro")
var f=request("add")
response.write("姓名是"+a);
response.write("密码是"+b);
response.write("性别是"+c);
response.write("兴趣爱好是"+d);
response.write("个人简介是"+e);
response.write("城市是"+f);
%>
</body>
</html> 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询