一个关于聊天室的问题啊?给分啊!!!

wxylvmnn 2002-02-21 12:55:56
我知道无论用asp或php要完成写屏聊天室的功能要用到js的document.write()啊,但是要怎么刷新啊。问问js的兄弟们。最好有代码啊
...全文
33 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
wxylvmnn 2002-02-22
  • 打赏
  • 举报
回复

是吗?
xml很好吗?
karma 2002-02-21
  • 打赏
  • 举报
回复
there are many ways to do partial refresh, use
1. hidden frame
2. remote scripting
3. components like "Microsoft.XMLHTTP"

to retrieve the newest chat information and then refresh the display screen
wxylvmnn 2002-02-21
  • 打赏
  • 举报
回复
这个我知道啊,但是要这么做,速度怎么办啊。这个可是聊天室啊,这么刷新不好啊。
karma 2002-02-21
  • 打赏
  • 举报
回复
why do you need to use document.write()?

if you want to refresh part of the page or change some html code, you can use some container's innerHTML property

for example, if you have
<div id="dvShow">hello</div>

you can change the content with
document.all("dvShow").innerHTML = "<B>world</B>";

of course, my code only works with IE

to refresh the whole page, you can use
window.location.reload(true);

again, this only works in IE



87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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