采用行写方式的聊天程序(之三)
采用行写方式的聊天程序(之三),采用行写方式的聊天程序(之三)
该程序为系统的核心,处理所关联的所有函数信息
<?session_start();?
<html
<head
<title发言区</title
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"
<style
body{background:59ACFF;color:black}
body{font-size:9pt;line-height:160%}
table{font-size:10.5pt}
input{font-size:9pt}
A{color:black;text-decoration:none}
A:Hover{text-decoration:underline}
</style
<script Language=JavaScript
//大家的信息
function dj(){
document.forms[0].towho.options[0].value="大家";
document.forms[0].towho.options[0].text="大家";
document.forms[0].saystemp.focus();
}
//动作,把该动作的信息添加到发言板中
function rc(list){
if (list!="0"){
document.forms[0].saystemp.value=list;
document.forms[0].saystemp.focus();
}
}
function backsays() {
document.forms[0].saystemp.value=document.forms[0].oldsays.value;
document.forms[0].saystemp.focus();
return true;
}
function checksays(){
if(document.fyq.saystemp.value==""){
alert("请输入发言。");
document.fyq.saystemp.focus();
return false;
}
if(document.fyq.saystemp.value==document.fyq.oldsays.value){
alert("内容不可重复。");
document.fyq.saystemp.focus();
document.fyq.saystemp.select();
return false;
}
document.fyq.oldsays.value=document.fyq.saystemp.value;
document.fyq.saystemp.value="";
document.fyq.saystemp.focus();
document.fyq.send.disabled=1;
setTimeout("document.fyq.send.disabled=0",30);
return true;
}
function cls(){
parent.f1.location.href="about:blank";
setTimeout("write(1)",500);
}
function write(cls){
var ffsize;
var lheight;
if (cls==1){
ffsize=parent.f2.document.fyq.fontsize.value;
lheight=parent.f2.document.fyq.lineheight.value;
}else{
ffsize='10.5';
lheight='145';
}
parent.f1.document.open();
parent.f1.document.writeln("<html<head<title对话区</title");
parent.f1.document.writeln("<meta http-equiv=Content-Type content="text/html; charset=gb2312"");
parent.f1.document.writeln("<style type=text/css.t{color:FF00FF;font-size:9pt;}");
parent.f1.document.writeln("body{font-family:"宋体";font-size:"+ffsize+"pt;line-height:" + lheight + "%;}A{text-decoration:none}A:Hover{text-decoration:underline}A:visited{color:blue}</style</head");
parent.f1.document.writeln("<Script Language="JavaScript1.1"");
parent.f1.document.writeln("var autoScrollOn=1;");
parent.f1.document.writeln("var scrollOnFunction;var scrollOffFunction;");
parent.f1.document.writeln("function scrollit()");
parent.f1.document.writeln("{if(!parent.f2.document.fyq.as.checked)");
parent.f1.d