![]() |
#2
shy00002008-08-29 08:54
|
就是下面的代码.
第一次访问能正常显示:"您还没有订购"
然后我选了几个按提交就出现乱码了.
就是显示这样的乱码:
����������ˮ�����£�
就是在ASP部分里才会显示乱码.象上面那行不在ASP标签里面的中文"请选择水果"就不会变成乱码.
我试了好多方法,在网上搜了一晚上了都没找到结果.
哪位大虾能帮帮我,小弟在此先行谢过!

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www. xmlns="http://www. http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<p>请选择水果:</p>
<hr/>
<form name="form1" method="get" action="">
<label>
<p>
<input type="checkbox" name="checkbox" value="苹果" />
苹果</p>
</label>
<label>
<p>
<input type="checkbox" name="checkbox" value="香蕉"/>
香蕉</p>
</label>
<label>
<p>
<input type="checkbox" name="checkbox" value="梨"/>
梨</p>
</label>
<label>
<input type="submit" name="button" id="button" value="提交" />
</label>
</form>
<hr/>
<%
if request.QueryString("checkbox")="" then
response.Write("您还没有订购")
else
response.write("您所订购的水果如下:"&"<br>")
for each fruit in request.QueryString("checkbox")
response.write("<font color=green>"&fruit&"</font><br>")
next
end if
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www. xmlns="http://www. http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
</head>
<body>
<p>请选择水果:</p>
<hr/>
<form name="form1" method="get" action="">
<label>
<p>
<input type="checkbox" name="checkbox" value="苹果" />
苹果</p>
</label>
<label>
<p>
<input type="checkbox" name="checkbox" value="香蕉"/>
香蕉</p>
</label>
<label>
<p>
<input type="checkbox" name="checkbox" value="梨"/>
梨</p>
</label>
<label>
<input type="submit" name="button" id="button" value="提交" />
</label>
</form>
<hr/>
<%
if request.QueryString("checkbox")="" then
response.Write("您还没有订购")
else
response.write("您所订购的水果如下:"&"<br>")
for each fruit in request.QueryString("checkbox")
response.write("<font color=green>"&fruit&"</font><br>")
next
end if
%>
[[it] 本帖最后由 小树不修不直溜 于 2008-8-29 18:35 编辑 [/it]]