导航:首页 > 源码编译 > 在线群聊天源码

在线群聊天源码

发布时间:2022-04-16 18:33:27

㈠ 求像“与同时访问此网站的人聊天”的浮动网页内聊天窗口的源码

以下代码 应该可以调用只要你自己美工下
<!--CTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt-->
<html>
<head>
<title>javaScript制作的聊天窗口代码 - www.webdm.cn</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<style type="text/css" media="all" rel="stylesheet">

<!--
body {
text-align:left;
margin:0;
font:normal 12px Verdana, Arial;
background:#FFEEFF
}
form {
margin:0;
font:normal 12px Verdana, Arial;
}
table,input {
font:normal 12px Verdana, Arial;
}
a:link,a:visited{
text-decoration:none;
color:#333333;
}
a:hover{
text-decoration:none;
color:#FF6600
}
#main {
width:400px;
position:absolute;
left:600px;
top:100px;
background:#EFEFFF;
text-align:left;
filter:Alpha(opacity=90)
}
#ChatHead {
text-align:right;
padding:3px;
border:1px solid #003399;
background:#DCDCFF;
font-size:11px;
color:#3366FF;
cursor:move;
}
#ChatHead a:link,#ChatHead a:visited, {
font-size:14px;
font-weight:bold;
padding:0 3px
}
#ChatBody {
border:1px solid #003399;
border-top:none;
padding:2px;
}
#ChatContent {
height:200px;
padding:6px;
overflow-y:scroll;
word-break: break-all
}
#ChatBtn {
border-top:1px solid #003399;
padding:2px
}
-->
</style><script language="javascript" type="text/javascript">
<!--
function $(d){return document.getElementById(d);}
function gs(d){var t=$(d);if (t){return t.style;}else{return null;}}
function gs2(d,a){
if (d.currentStyle){
var curVal=d.currentStyle[a]
}else{
var curVal=document.defaultView.getComputedStyle(d, null)[a]
}
return curVal;
}
function ChatHidden(){gs("ChatBody").display = "none";}
function ChatShow(){gs("ChatBody").display = "";}
function ChatClose(){gs("main").display = "none";}
function ChatSend(obj){
var o = obj.ChatValue;
if (o.value.length>0){
$("ChatContent").innerHTML += "<strong>Akon说:</strong>"+o.value+"<br/>";
o.value='';
}
}
if (document.getElementById){
(
function(){
if (window.opera){ document.write("<input type='hidden' id='Q' value=' '>"); }

var n = 500;
var dragok = false;
var y,x,d,dy,dx;

function move(e)
{
if (!e) e = window.event;
if (dragok){
d.style.left = dx + e.clientX - x + "px";
d.style.top = dy + e.clientY - y + "px";
return false;
}
}

function down(e){
if (!e) e = window.event;
var temp = (typeof e.target != "undefined")?e.target:e.srcElement;
if (temp.tagName != "HTML"|"BODY" && temp.className != "dragclass"){
temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;
}
if('TR'==temp.tagName){
temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;
temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;
temp = (typeof temp.parentNode != "undefined")?temp.parentNode:temp.parentElement;
}

if (temp.className == "dragclass"){
if (window.opera){ document.getElementById("Q").focus(); }
dragok = true;
temp.style.zIndex = n++;
d = temp;
dx = parseInt(gs2(temp,"left"))|0;
dy = parseInt(gs2(temp,"top"))|0;
x = e.clientX;
y = e.clientY;
document.onmousemove = move;
return false;
}
}

function up(){
dragok = false;
document.onmousemove = null;
}

document.onmousedown = down;
document.onmouseup = up;

}
)();
}
-->
</script>
</head>
<body>
<div class="dragclass" id="main" style="LEFT: 588px; TOP: 298px">
<div id="ChatHead"><a onclick="ChatHidden();" href="#">-</a> <a onclick="ChatShow();" href="#">+</a> <a onclick="ChatClose();" href="http://www.webdm.cn">x</a> </div>
<div id="ChatBody">
<div id="ChatContent"></div>
<div id="ChatBtn">
<form action="" method="post" name="chat">
<textarea style="WIDTH: 350px" rows="3" name="ChatValue"></textarea> <input onclick="ChatSend(this.form);" type="button" name="Submit" value="Chat" />
</form>
</div>
</div>
</div>
</body>
</html>

㈡ 跪求JAVA群聊天代码

3459067873有

㈢ 能不能找到即时在线聊天的网页源代码

可是搜索一下啊

㈣ JAVA局域网聊天系统源码,简单的聊天系统就够了,界面包括登录界面、聊天界面,能群聊和私聊 有的请发我


给你发过去了哦

㈤ 求一个能私聊,群聊的Java小程序源代码

联系方式也不留
几个类呢。
代码都复制这里?
看到加我
7810554

㈥ 谁知道用JAVA去实现一个简易的QQ群聊天功能,求源代码。。。高价悬赏

客户端:java Socket类
服务器:java ServerSocket类
读写用:BufferedReader,PrintWriter
之后利用线程
思路是这样的

㈦ 怎么实现网页版的在线聊天啊,用html写,求源代码

这纯html是写不出来的 要后台程序语言写 你可以去网上下载一个 有很多

㈧ 求jsp web 聊天室源码或者 jsp web即时通讯工具.能聊天.在网页中.源码. .

我现在就有一个这样的东西。。
做的很简单,其实是自己练习写一个购物网站 里面加的一个聊天室

㈨ 求JAVA webQQ在线聊天源码

客户端源代码
import java.net.Socket;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class socketClient
{
private DataOutputStream output;
private DataInputStream input;
private String clientName;

public static void main(String[] args)
{
//在main函数中,启动服务器的socket
new socketClient().ConnectServer();
}

public void ConnectServer()
{
try
{
Socket socket = new Socket("127.0.0.1",10001);
clientName = socket.getInetAddress().toString();
input = new DataInputStream(socket.getInputStream());
output = new DataOutputStream(socket.getOutputStream());

new readServer().start();
new writeServer().start();
}
catch(Exception e) {System.out.println(e.toString());}
}

public class readServer extends Thread
{
private Socket client;

public void run()
{
String msg;
try
{
while(true)
{
msg = input.readUTF();
if(msg!=null)
System.out.println("收到消息:【"+clientName+"】 "+msg);
}
}
catch(Exception e) {System.out.println(e.toString());}
}
}

public class writeServer extends Thread
{
private Socket client;
public void run()
{
try
{
BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
String userInput;
while(true)
{
if(stdIn.ready())
{
userInput = stdIn.readLine();
if(userInput!="exit")
{
output.writeUTF(userInput);
System.out.println("已发送消息给【"+clientName+"】"+userInput);
}
}
}
}
catch(Exception e) {System.out.println(e.toString());}
}
}

}

服务器源代码

import java.net.ServerSocket;
import java.net.Socket;
import java.util.ArrayList;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class socketServer
{
ArrayList clientList = new ArrayList();
//private DataOutputStream output;
//private DataInputStream input;
//private String clientName;
//private Socket socket;

public static void main(String[] args)
{
//在main函数中,启动服务器的socket
new socketServer().OpenServer();

}

public void OpenServer()
{
try
{
ServerSocket server = new ServerSocket(10001);

Socket socket;
while((socket = server.accept())!=null)
{
clientList.add(socket);
//clientName = socket.getInetAddress().toString();
//output = new DataOutputStream(socket.getOutputStream());
//input = new DataInputStream(socket.getInputStream());
new readClient(socket).start();
new writeClient(socket).start();
}
}
catch(Exception e) {System.out.println(e.toString());}
}

public class readClient extends Thread
{
private Socket socket;

public readClient(Socket client)
{socket = client;}

public void run()
{
String msg;
try
{
String clientName = socket.getInetAddress().toString();
DataOutputStream output = new DataOutputStream(socket.getOutputStream());
DataInputStream input = new DataInputStream(socket.getInputStream());
while((msg = input.readUTF())!=null)
{
System.out.println("收到消息:【"+clientName+"】 "+msg);
}
}
catch(Exception e){System.out.println(e.toString());}
}
}

public class writeClient extends Thread
{
private Socket socket;

public writeClient(Socket client)
{socket = client;}

public void run()
{
try{

BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in));
String userInput;
String clientName = socket.getInetAddress().toString();
DataOutputStream output = new DataOutputStream(socket.getOutputStream());
DataInputStream input = new DataInputStream(socket.getInputStream());
while(true)
{
if(stdIn.ready())
{
userInput = stdIn.readLine();
if(userInput!="exit")
{
output.writeUTF(userInput);
System.out.println("已发送消息给【"+clientName+"】"+userInput);
}
}
}
}
catch(Exception e) {System.out.println(e.toString());}
}
}

}

㈩ 在线客服系统源码

PowerTalkBox,现在我们公司就用这个,用ASP.NET实现的,源码开放,方便第二次开放,支持单聊,多聊,群聊。你想看看效果可以去http://www.51aspx.com/CV/PowerTalkBox

这个我用的是QQ客服,链接到QQ的,像现在QQ那么普及。。

源码那里是链接到自己站内的聊天室的,不用安插件什么的,还提供表情和聊天记录的保存

阅读全文

与在线群聊天源码相关的资料

热点内容
滴滴加密录像投诉 浏览:975
word兼容pdf 浏览:641
阿里云轻量应用服务器怎么买 浏览:567
斗鱼程序员工资待遇 浏览:345
不能应用去色调整命令 浏览:893
开启设备加密 浏览:79
起亚压缩机保修 浏览:975
单片机国内发展趋势 浏览:771
警戒指标公式源码 浏览:130
python标准库之网络相关 浏览:38
adbjava 浏览:408
php工资太低 浏览:737
手动建造命令方块教程 浏览:7
英语三个命令 浏览:352
axure入门到精通pdf 浏览:39
应用软件怎么隐藏和加密 浏览:383
带有显卡的云服务器 浏览:795
slice切片python 浏览:485
建设工程比例折算法 浏览:745
蓝线是哪个app上的 浏览:550