例如: 豆豆进入登录页面后在文本框上输入称呼,然后点击“加入”按钮
丁丁也进入登录页面同样输入称呼,进入
以上两人都在同一台机器上进入登录页面,只能打开一个聊天主窗口
无法聊天啊!
就像我和你都在你的电脑上进入csdn,点击“大本营”,应该打开两个窗口,可是我的不能
丁丁也进入登录页面同样输入称呼,进入
以上两人都在同一台机器上进入登录页面,只能打开一个聊天主窗口
无法聊天啊!
就像我和你都在你的电脑上进入csdn,点击“大本营”,应该打开两个窗口,可是我的不能
调试欢乐多
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><frameset rows="*,80" frameborder="NO" border="0" framespacing="0">
<frame name="main" src="ac.jsp">
<frame name="bottomFrame" scrolling="NO" noresize src="1.htm">
</frameset>
<noframes><body bgcolor="#FFFFFF">
</body></noframes>
</html>
<%@page contentType="text/html;charset=gb2312"%>
<%//@page contentType="text/html;charset=gb2312"%>
<%@page import="java.util.*"%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="500">
</head>
<body>
<%
Vector chatWords;
chatWords=(Vector)application.getAttribute("chatWords");
if (chatWords==null)
{
chatWords=new Vector();
application.setAttribute("chatWords",chatWords);
}else{
String userName,words,lineWords;
userName=request.getParameter("userName");
words=request.getParameter("words");
if (!(userName==null)||(words==null)){
byte[] temp;
temp=words.getBytes("iso8859-1");
lineWords=new String(temp);
temp=userName.getBytes("iso8859-1");
lineWords=userName+"说道:"+lineWords;
chatWords.add(lineWords);
}
}
//output
Object[] arrayChatWords;
arrayChatWords=chatWords.toArray();
int wordsLen=arrayChatWords.length;
for (int i=wordsLen-1;i>=0;i--){
out.println((String)arrayChatWords[i]);
out.println("<br>");
}
%>
</body>
</html>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT=""></HEAD><BODY>
<form name=1 method=post action="ac.jsp" target=main>
用户名:<INPUT TYPE="text" NAME="userName" size=6 maxlength=6 value="lc"><br>
发言内容:<INPUT TYPE="text" NAME="words" size=80 maxlength=80>
<INPUT TYPE="submit" NAME="发言">
</BODY>
</HTML>
奇怪,你老师也喜欢多个人同时在同一台计算机上聊天?
呵呵。看来你跟 smqzou() 的老师是同一个。
修改 target属性。没错
问题解决我和123cfdi都很感激你拿分吧