| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1401 人关注过本帖
标题:[求助]如何实现网页内容的自动刷新啊?
取消只看楼主 加入收藏
vcfriend
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2007-3-12
收藏
 问题点数:0 回复次数:0 
[求助]如何实现网页内容的自动刷新啊?

表单提交后。每次总得重新刷新一下,才能显示修改后的内容。为什么代码中有强制浏览器刷新的代码,但还是得手动刷新。实在不知道是什么原因。请教中。。。


<!--#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">&nbsp;</td>
</tr>
<tr class="tdbg">
<td width="100" align="right" valign="top"><br>
&nbsp;&nbsp;&nbsp;</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>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" value=" 提 交 "
name="cmdok">
&nbsp;
<input type="reset" value=" 重 写 "
name="cmdcancel">
</div></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2">&nbsp;</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,"\","&#92;")
fString=Replace(fString,"'","&#39;")
fString=Replace(fString,"<A href=","<A target=_blank href=") '点链接打开新窗口
if SiteSettings("BannedHtmlLabel")<>"" then fString=ReplaceText(fString,"<(\/|)("&SiteSettings("BannedHtmlLabel")&")", "&lt;$1$2")
if SiteSettings("BannedHtmlEvent")<>"" then fString=ReplaceText(fString,"<(.[^>]*)("&SiteSettings("BannedHtmlEvent")&")", "&lt;$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编辑过]

搜索更多相关主题的帖子: 网页 自动 
2007-03-12 16:24
快速回复:[求助]如何实现网页内容的自动刷新啊?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017049 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved