为什么小弟asp文件中文显示会是乱码?
为什么小弟asp文件中文显示会是乱码?
具体文件如下:
<!--#include file="conn.asp"-->
<style type="text/css">
<!--
.STYLE3 {font-size: 12px}
-->
</style>
<%
session.Timeout=20
session("userID")=cstr(session.SessionID)
response.Expires=0
const intpagesize=6
dim intcur,inttotal,I
dim cn,rst,strconn,strsql
if request.ServerVariables("content_length")=0 then
intcur=1
else
intcur=cint(request.form("curpage"))
select case request.form("page")
case "ê×ò3"
intcur=1
case "é?ò?ò3"
intcur=intcur-1
case "??ò?ò3"
intcur=intcur+1
case "?2ò3"
intcur=cint(request.form("lastpage"))
end select
end if
set rst = Server.CreateObject("ADODB.Recordset")
strsql="select * from books"
rst.Open strsql,conn,3,3
'??PageSizeê?D?éè?aò?ò3é?òa??ê?μ?????êy
rst.PageSize = intPageSize
inttotal=rst.pagecount
If Not rst.EOF then 'è?1?????2??a???òéè??μ±?°?????ù?úμ?ò3o?
rst.AbsolutePage = intCur
end if
%>
<title>í?é?êéμê</title>
</head>
<body>
<p><center><h2>í?é?êéμê</h2>
<hr>
<b>±?êéμê??óDí?êé<%=rst.recordcount%>???·??12<%=inttotal%>ò3 μ±?°ê?μú<%=intcur%>ò3</b>
<p>
<form name="" method=post action="<%=request.servervariables("script_name")%>">
<input type="hidden"name="curpage"value="<%=intcur%>">
<input type="hidden"name="lastpage"value="<%=inttotal%>">
<input type="submit"name="page"value="ê×ò3">
<%
'è?1?μ±?°2?ê?μúò?ò3?ò??ê?"é?ò?ò3"°′?¥
if intcur>1 then
%>
<input type="submit"name="page"value="é?ò?ò3">
<%end if%>
<%
'è?1?μ±?°2?ê?×?oóò?ò3?ò??ê?"??ò?ò3"°′?¥
if intcur<=rst.pagecount-1 then
%>
<input type="submit"name="page"value="??ò?ò3">
<%end if%>
<input type="submit"name="page"value="?2ò3">
</form>
</p>
<%
'ê1ó?±í????ê?SQLêy?Y?a?D±í??μ??úèY
I=0
response.Write"<table border cellspacing=1 cellpadding=7>"
response.Write"<tr heght=30><td width=40>"&"±ào?"&_
"<td width=260>"&"í?êé??3?"&"</td>"&_
"<td width=180>"&"í?êé×÷??"&"</td>"&_
"<td width=40>"&"????"&"</td>"&_
"<td width=70>"&"ê?·?1o?ò"&"</td></tr>"
do while not rst.eof and I<rst.pagesize
response.Write"<tr height=30><td width=40>"& rst.absoluteposition &_
"<td width=260>"&rst("bookname")&"</td>" &_
"<td width=180>"&rst("writer")&"</td>" &_
"<td width=40>"&rst("price")&"</td>" &_
"<td width=70><a href=addcart.asp?bookid="& rst("BookID") &_
">1o?ò</a></td></tr>"
rst.movenext'??1a±êò?μ???ò?????
I=I+1
loop
response.write "</table>"
rst.close
%>
<hr>
<a href="showcart.asp">2é?′1o?ò3μ?Dμ?éì?·</a>
</center>
</body>
</html>
请各位高人帮帮忙呀!谢谢了!
另外小弟想知道怎样改变里面字体的颜色和背景的颜色!请各位高人一起告诉我吧,小弟刚学这个ASP,急呀!因为是我这学期的项目,请帮帮忙,谢谢了!
|