表单提交后。每次总得重新刷新一下,才能显示修改后的内容。为什么代码中有强制浏览器刷新的代码,但还是得手动刷新。实在不知道是什么原因。请教中。。。
<!--#include file="admin.asp"-->
<!--#include file="conn.asp"-->
<%
response.buffer=true
'强制浏览器重新访问服务器下载页面,而不是从缓存读取页面
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
sql="select * from main where home=1"
Set rs_home= Server.CreateObject("ADODB.Recordset")
rs_home.open sql,conn,1,1
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>了解公司</title>
<!-- #include file="Inc/Head.asp" -->
<table width="786" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="150" align="center" valign="top"> <table width="150" height="100%" border="0" cellpadding="0" cellspacing="0" class="HeaderTdStyle">
<tr>
<td align="center" valign="top"><table width="100%" height="24" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">功能菜单</td>
</tr>
</table>
<table width="100%" height="90%" border="0" cellpadding="0" cellspacing="0" class="MenuBg">
<tr>
<td align="center" valign="top"><br>
<table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="16%"><img src="../Image/Left_1.gif" width="28" height="11"></td>
<td width="84%" height="20"><font color="#FFFF00">企业信息管理</font></td>
</tr>
</table>
<table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="34%" height="20" align="right"><img src="../Image/Left_1_1.gif" width="29" height="16"></td>
<td width="66%" valign="bottom"><a href="Manage_Main.asp"><font color="#FFFF00">公司简介</font></a></td>
</tr>
</table>
<table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="34%" height="20" align="right"><img src="../Image/Left_1_1.gif" width="29" height="16"></td>
<td width="66%" valign="bottom"><a href="Manage_Main1.asp"><font color="#FFFF00">企业文化</font></a></td>
</tr>
</table>
<table width="90%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="19" align="right"><img src="../Image/Left_1_1.gif" width="29" height="16"></td>
<td valign="bottom"><a href="Manage_Main2.asp"><font color="#FFFF00">大记事</font></a></td>
</tr>
<tr>
<td width="34%" height="20" align="right"><img src="../Image/Left_1_1.gif" width="29" height="16"></td>
<td width="66%" valign="bottom"><a href="Manage_Main3.asp"><font color="#FFFF00">了解新同事</font></a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="636" align="center" valign="top"> <br>
<strong><br>
</strong>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="25">
<div align="center"><strong><span style="color: #313031"><a href="Manage_Main.asp">公
司 简 介</a></span> 信 息 设 置
</strong></div></td>
</tr>
<tr>
<form method="POST" name="myform" action="Manage_Main_Save.asp?no=JianJei" OnSubmit="return CheckForm()" onReset="return ResetForm();">
<td><table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td height="30" colspan="2"> </td>
</tr>
<tr class="tdbg">
<td width="100" align="right" valign="top"><br>
</td>
<td colspan="2"><textarea name="Content" style="display:none"></textarea>
<iframe ID="editor" src="Editor_Main.asp?Action=Modify&ActionFrome=main&ArticleID=<%=rs_home("home")%>" frameborder=1 scrolling=no width="680" height="382"></iframe>
</td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" value=" 提 交 "
name="cmdok">
<input type="reset" value=" 重 写 "
name="cmdcancel">
</div></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table></td></form>
</tr>
</table>
</td>
</tr>
</table>
<%
rs_home.close
set rs_home=nothing
call CloseConn()
%>
<!-- #include file="Inc/Foot.asp" -->
<%
function ContentEncode(fString)
fString=Replace(fString,vbCrlf, "")
fString=Replace(fString,"\","\")
fString=Replace(fString,"'","'")
fString=Replace(fString,"<A href=","<A target=_blank href=") '点链接打开新窗口
if SiteSettings("BannedHtmlLabel")<>"" then fString=ReplaceText(fString,"<(\/|)("&SiteSettings("BannedHtmlLabel")&")", "<$1$2")
if SiteSettings("BannedHtmlEvent")<>"" then fString=ReplaceText(fString,"<(.[^>]*)("&SiteSettings("BannedHtmlEvent")&")", "<$1$2")
if SiteSettings("BannedText")<>"" then
filtrate=split(SiteSettings("BannedText"),"|")
for i = 0 to ubound(filtrate)
fString=ReplaceText(fString,""&filtrate(i)&"",string(len(filtrate(i)),"*"))
next
end if
contentEncode=fString
end function
%>
<script language = "JavaScript">
function CheckForm()
{
if (editor.EditMode.checked==true)
document.myform.Content.value=editor.HtmlEdit.document.body.innerText;
else
document.myform.Content.value=editor.HtmlEdit.document.body.innerHTML;
if (document.myform.Content.value.length>6400000)
{
alert("信息内容太长,超过了6.4M!建议将信息分成几部分录入,否则可能影响存储信息和读取信息的速度!如果您执意的话,请继续!");
editor.HtmlEdit.focus();
return false;
}
return true;
}
</script>
[此贴子已经被作者于2007-3-12 16:46:36编辑过]