聊天室等对你的学习有很大的帮助 ,谢谢你们给我这次机会
源代码在线查看: transact.jsp
软件大小: |
132 K |
上传用户: |
q459753722 |
|
|
关键词: |
|
下载地址: |
免注册下载 普通下载
|
|
outputMessage
function scrollchange()
{
parent.mainFrame.window.scroll(0,60000);
parent.mainFrame.document.bgColor="#ffffff";
return true;
}
String Name =(String)session.getValue("Name");
if (Name == null) {
return;
}
String str1="";
String str2=new String(""+Name+"");
String str3=new String("[悄悄话]");
String str4=new String("");
String str5=new String("对");
String str6="";
Integer MessageIndex =(Integer)session.getValue("MessageIndex");
if((MessageIndex==null )||( MessageIndex.intValue() >= 200 ))
MessageIndex=new Integer(0);
synchronized(application) {
String alone=new String("yes");
Vector DisplayMessage=null;
DisplayMessage =(Vector)application.getAttribute("Message");
if(DisplayMessage !=null) {
if(DisplayMessage.size()< MessageIndex.intValue()) {
MessageIndex=new Integer(DisplayMessage.size());
}
if(MessageIndex.intValue()!= DisplayMessage.size()) {
for(int i=MessageIndex.intValue();i int aloneindex=i;
int nameindex=i+1;
int talkwithindex=i+2;
String Messagestr= (String)DisplayMessage.get(i+3);
String systemSpeak= (String)DisplayMessage.get(i+4);
String action2= (String)DisplayMessage.get(i+5);
String alonetag = (String)DisplayMessage.get(aloneindex);
if(alonetag==null)
alonetag=new String("all");
String nametag = (String)DisplayMessage.get(nameindex);
String talkwithtag =(String)DisplayMessage.get(talkwithindex);
//设置欢迎语句
if(systemSpeak.compareTo("yes")==0) {
Messagestr = str1+Messagestr+str6;
%>
parent.mainFrame.document.write("")
}
else {
//悄悄话
if(alonetag.compareTo(alone)==0) {
//自己对别人说悄悄话
if(nametag.compareTo(Name)==0) {
//有动作
if (action2.compareTo(alone)==0) {
Messagestr=str1+str3+str2+Messagestr+str4+str6;
}
//没动作
else {
Messagestr=str1+str3+str2+"对"+talkwithtag+"说:"+Messagestr+str4+str6;
}
%>
parent.mainFrame.document.write("")
}
//别人对自己说悄悄话
if((talkwithtag.compareTo(Name)==0)) {
//有动作
if (action2.compareTo(alone)==0) {
Messagestr=str1+str3+""+nametag+""+Messagestr+str4+str6;
}
//没有动作
else {
Messagestr=str1+str3+""+nametag+"对"+str2+"说:"+Messagestr+str4+str6;
}
%>
parent.mainFrame.document.write("")
}
}
//自己对别人说话
else {
if(nametag.compareTo(Name)==0) {
//有动作
if (action2.compareTo(alone)==0) {
Messagestr=str1+str2+Messagestr+str4+str6;
}
//没动作
else {
Messagestr=str1+str2+"对"+talkwithtag+"说:"+Messagestr+str4+str6;
}
%>
parent.mainFrame.document.write("")
}
//别人对自己说话
else if((talkwithtag.compareTo(Name)==0)) {
//有动作
if (action2.compareTo(alone)==0) {
Messagestr=str1+""+nametag+""+Messagestr+str4+str6;
}
//无动作
else {
Messagestr=str1+""+nametag+"对"+str2+"说:"+Messagestr+str4+str6;
}
%>
parent.mainFrame.document.write("")
}
//其他人的讲话
else {
//有动作
if (action2.compareTo(alone)==0) {
Messagestr= str1+""+nametag+""+Messagestr+str4+str6;
}
else {
Messagestr= str1+""+nametag+""+"对"+talkwithtag+"说:"+Messagestr+str4+str6;
}
%>
parent.mainFrame.document.write("")
}
}
}
Integer count=new Integer(i+6);
session.putValue("MessageIndex",count);
}
}
}
else
out.println("Welcome to here!");
}
%>