江湖救急,菜鸟问题

wxhfi 2004-08-04 10:20:16
1、做了个新闻系统,发布新闻的时候是段首行低两格,分段的,可是显示的时候却没有低两格,分段,该怎么做才能让它显示的时候低两格,分段呢?
2、添加新闻后,只有单击刷新按钮,在显示新闻标题的页面才显示新添加的新闻标题,该怎么做才能不单击刷新按钮,链接到显示新闻标题的页面时也能显示新添加的新闻标题呢?
谢谢!!
...全文
147 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
dotnet东哥 2004-08-04
  • 打赏
  • 举报
回复
2.用javascript+xmlhttp+asp定时刷新!
dcwang 2004-08-04
  • 打赏
  • 举报
回复
1,<table width=200 style="word-break:normal;">
<tr><td>Sets or retrieves line-breaking behavior within words, particularly where multiple ar in the object.
</td></tr></table>


适用于英文:style="word-break:keep-all"
适用于中文:style="word-break:break-all"
这样就会你输入怎么样,输出也就怎么样了.

2,设一个提交后自动刷新的功能就可以了.

satans18 2004-08-04
  • 打赏
  • 举报
回复
1,
function encodestr(str)
dim i
str=trim(str)
str=replace(str,"<","<")
str=replace(str,">",">")
str=replace(str,"'","""")
str=replace(str,vbCrLf&vbCrlf,"</p><p>")
str=replace(str,vbCrLf,"<br>")
encodestr=replace(str," "," ")
end function%>

content=encodestr(request("content"))'用这个函数返回内容

2,不要用response.write"<SCRIPT language=JavaScript>javascript:history.go(-1)</SCRIPT>"
用Response.Write("<script>location.href=""你要显示的页"";</script>")
QZY2003 2004-08-04
  • 打赏
  • 举报
回复

试一下
1.
replace(内容,char(13),"<br>")

2.
<meta http-equiv="Refresh" content="2">
wxhfi 2004-08-04
  • 打赏
  • 举报
回复
up!

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧