您现在的位置: 无忧电子商务网 >> 信息学院 >> 程序开发 >> php >> 正文

基于PHP的聊天室编程思想

作者:佚名    信息学院来源:整理    点击数:    更新时间:2008-2-2 我要参与讨论

 

聊天室编程思想--主动更新与被动更新

主动更新与被动更新

聊天的内容如何显示在屏幕上,一种是每隔一段时间刷新一次页面,读入全部聊天内容,然后显示,这里采用的是js的document.write的方法实现不刷新的聊天页面!

1 主页面的生成,规定了css类型,显示欢迎词
function write2(){
if(this.u.document==null)return;
this.u.document.writeln("<html><head>");
this.u.document.writeln("<meta http-equiv=content-type content=text/html; charset=gb2312>");
this.u.document.writeln("<style type=text/css>");
this.u.document.writeln(".p9 { font-size: 11pt; line-height: 15pt}");
this.u.document.writeln("body { font-size: 11pt; line-height: 15pt}");
this.u.document.writeln("a:visited { font-size: 11pt;color: #0000ff; text-decoration: none;}");
this.u.document.writeln("a:link { font-size: 11pt;color: #0000ff; text-decoration: none}");
this.u.document.writeln("a:hover { font-size: 11pt;color: #ff0000}");
this.u.document.writeln("</style>");

this.u.document.writeln("</head>");
this.u.document.writeln("<body);
//.................. 这里插入生成在线人数组的程序段

this.u.document.writeln("<script>");
this.u.document.writeln("<p class=p9 align=left>"

 << 上一页  [11] [12] [13] [14] [15] [16] 下一页

在google里搜索更多基于PHP的聊天室编程思想

Google
Web www.51ec.org
  • 上一篇信息学院:

  • 下一篇信息学院:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    我来说两句 对此文章发表了评论
      昵 称: *必填    ·注册用户·
      评 分: 1分 2分 3分 4分 5分     严禁发表危害国家安全、政治、黄色淫秽等内容的评论,用户需对自己在使用本网站服务过程中的行为承担法律责任。本站管理员有权保留或删除评论内容,评论内容只代表机友个人观点,与本网站立场无关。  
    评 论
    内 容

     
    评论列表 (最新 评论仅限网友观点!)

    供求信息




    | 设为首页 | 加入收藏 | 关于我们 | 广告服务 | 联系方式 | 友情链接 | 版权申明