我的网页用的是UTF-8字体,这个字体好像没有“%”,spec原来数据中有"%",后来我点更新网页"update",“%”就不见了,还有spec摄氏温度“℃”也变成乱码,如何才能保持这些符号的正确显示呢!谢谢大家
chg.asp代码:
<!--#include file=sqlopen.txt-->
<script language="JavaScript">
function CheckChamberNew()
{
if (document.ChamberNew.ID.value.length==0)
{
alert("Please input ID");
document.ChamberNew.ID.focus;
return false;
}
if (document.ChamberNew.ID.value.length>9)
{
alert("Equipment ID should be less than 9 letters!");
document.ChamberNew.ID.focus;
return false;
}
if (document.ChamberNew.Spec.value.length==0)
{
alert("please input Spec");
document.ChamberNew.Spec.focus;
return false;
}
if (document.ChamberNew.Model.value.length==0)
{
alert("please input Model");
document.ChamberNew.Model.focus;
return false;
}
if (document.ChamberNew.Size.value.length==0)
{
alert("Please input Size");
document.ChamberNew.Size.focus;
return false;
}
if (document.ChamberNew.Status.value.length==0)
{
alert("Please input Status");
document.ChamberNew.Status.focus;
return false;
}
if (document.ChamberNew.ChkTime.value.length==0)
{
alert("Please input latest Checkout Time!");
document.ChamberNew.ChkTime.focus;
return false;
}
if (document.ChamberNew.Manual.value.length==0)
{
alert("Please upload Manual!");
document.ChamberNew.Manual.focus;
return false;
}
return true;
}
</script>
<%
No=request.queryString("No")
ID=request.queryString("ID")
Spec=request.queryString("Spec")
Model=request.queryString("Model")
Size=request.queryString("Size")
status=request.queryString("Status")
ChkTime=request.queryString("ChkTime")
Manual=request.queryString("Manual")
%>
<br>
<form name="Chamber" method="post" action="EVEquipmentChgChk.asp" onSubmit="return CheckChamber();">
<table align="center">
<tr ><td align="left" bgcolor="#EFEF67" >Update Equipment Information</td></tr>
</table>
<br>
<table width="250" border="0" bordercolorlight="#FFFFFF" bgcolor="#EFEFEF" cellpadding="1" cellspacing="1" align="center">
<input type="hidden" name="No" size="20" value="<%=request.querystring("No")%>">
<tr >
<td align="right" bgcolor="#EFEFEF" >ID:</td>
<td bgcolor="#FFFFFF" align="left">
<input type="text" name="ID" size="20" value=<%=ID%>>
</td>
</tr>
<tr >
<td align="right" bgcolor="#EFEFEF" >Spec:</td>
<td bgcolor="#FFFFFF">
<input type="text" name="Spec" size="20" value=<%=Spec%>>
</td>
</tr>
<tr >
<td align="right" bgcolor="#EFEFEF" >Model:</td>
<td bgcolor="#FFFFFF">
<input type="text" name="Model" size="20" value=<%=Model%>>
</td>
</tr>
<tr >
<td align="right" bgcolor="#EFEFEF" >Size:</td>
<td bgcolor="#FFFFFF">
<input type="text" name="Size" size="20" value=<%=Size%>>
</td>
</tr>
<tr>
<td align="right" bgcolor="#EFEFEF" >Status:</td>
<td bgcolor="#FFFFFF">
<select name="Status">
<option value=<%=status%>><%=status%></option>
<option value=Idel>Idel</option>
<option value=Repair>Repair</option>
<option value=CheckOut>CheckOut</option>
<option value=Reject>Reject</option>
<option value=Using>Using</option>
</select>
</td>
</tr>
<tr >
<td align="right" bgcolor="#EFEFEF" >ChkTime:</td>
<td bgcolor="#FFFFFF">
<input type="text" name="ChkTime" size="20" value=<%=ChkTime%>>
</td>
</tr>
<tr>
<td align="right" bgcolor="#EFEFEF" >Remark:</td>
<td bgcolor="#FFFFFF">
<textarea name="Remark"><%=Remark%></textarea>
</td>
</tr>
<tr>
<td align="right" bgcolor="#EFEFEF" >Manual:</td>
<td bgcolor="#FFFFFF">
<textarea name="Manual"><%=Manual%></textarea>
</td>
</tr>
<tr align="center" >
<td colspan="2" bgcolor="#FFFFFF">
<input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="reset"> <input TYPE="button" VALUE="return" ONCLICK="history.back(-1)">
</td>
</tr>
</table>
</form>
chgchk.asp:
<!--#include file=sqlopen.txt-->
<%
EVNo=trim(request.form("EVNo"))
ID=trim(request.form("ID"))
Spec=trim(request.form("Spec"))
Model=trim(request.form("Model"))
EVSize=trim(request.form("EVSize"))
Status=trim(request.form("Status"))
ChkTime=trim(request.form("ChkTime"))
Manual=trim(request.form("Manual"))
Set rsChamber = Server.CreateObject("ADODB.Recordset")
SqlChamber="select top 1 * from EVEquipmentInfo where EVNo="&EVNo
rsChamber.Open SqlChamber,conn,1,3
rsChamber("ID")=ID
rsChamber("Spec")=Spec
rsChamber("Model")=Model
rsChamber("EVSize")=EVSize
rsChamber("Status")=Status
rsChamber("ChkTime")=ChkTime
rsChamber("Manual")=Manual
rsChamber.update
response.write"<script language=javascript>"
response.write"alert(""Update Success!"")"
response.write"</script>"
response.redirect("EVEquipmentupdate.asp")
rsChamber.close
set rsChamber=nothing
Conn.close
set Conn=nothing
%>,
[此贴子已经被作者于2007-8-8 16:40:15编辑过]