聊天室|刷新|无刷新
无刷新聊天室技术实现方法
一、统一名词
文字框:显示聊天内容的框架页面
输入框:输入聊天信息的框架页面
刷新框:自刷新获取最新聊天信息的框架页面,该页面不直接显示出来
二、如何实现
实现无刷新,就是要在当前文字框聊天内容后面不断的添加新的聊天信息。
实现的方式是“添加新信息”,而不是“重新刷新”。
三、技术要点
实现像chat.163.com的无闪烁刷新的聊天室要用到的关键代码:
1.自刷新:
2.向html文件写代码:
<script> <br/>top.frametext.document.write("text"); <br/></script>
四、例子
1.frame.asp页面。最简单的包含三个框架页
文本框frametext.htm;name=frametext
输入框frameinput.asp;
刷新框framerefresh.asp;
2.文本框frametext.htm内容:
最简单的文本内容。略
3.输入框frameinput.asp内容:
略
4.刷新框framefresh.asp内容(关键)
......
'此处用代码获取最新的聊天信息
'最新信息保存在数组ArrRecord()
'OutNum参数纪录是否有新的聊天纪录出现
%>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

SublimeText3 Linux new version
SublimeText3 Linux latest version

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
