📄 state.htm
字号:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META HTTP-EQUIV="PRAGMA" CONTENT="CACHE">
<META HTTP-EQUIV="EXPIRES" CONTENT="TUE,04 Dec 2096 21:29:02 GMT">
<title>状态设置</title>
<style type="text/css">
<!--
td, p, input, font, select, option, textarea, form { font-family:"宋体"; font-size: 12px }
.p9 {font-size: 9pt; line-height: 14pt }
-->
</style>
</head>
<script language="javascript">
var iselect=0;
var appletmark="";
function c_value(ename,evalue)
{
for(i=0; i<document.all.length; i++)
{
if(document.all(i).name==ename)
document.all(i).color=evalue;
}
}
function on_init()
{
var stateindex=0;
appletmark=opener.document.ChatClient.getAppletMark();
var statetxt=opener.document.ChatClient.getMyState();
if(statetxt.length>2)
stateindex=9;
else
stateindex=eval(statetxt);
if(stateindex==0)
{
document.form1.selstat[0].checked=true;
changeState(0);
c_value("s1","#FF0000");
}
else if(stateindex==9)
{
document.form1.selstat[2].checked=true;
changeState(2);
document.form1.lstat2.value=statetxt;
c_value("s3","#FF0000");
}
else
{
document.form1.selstat[1].checked=true;
changeState(1);
document.form1.lstat1.selectedIndex=stateindex-1;
c_value("s2","#FF0000");
}
}
function click_ok()
{
if(appletmark=="" || appletmark!=opener.document.ChatClient.getAppletMark())
{
alert("本页面已经超时了,请重新打开窗口。");
window.close();
return;
}
var ival="0";
if(iselect==1)
{
var idx=document.form1.lstat1.selectedIndex;
ival=document.form1.lstat1.options[idx].value;
}
else if(iselect==2)
{
ival=document.form1.lstat2.value;
if(ival.length<3)
{
alert("请输入自动回复信息的内容。不能少于3个字。");
return ;
}
}
opener.document.ChatClient.setMyState(ival);
window.close();
}
function changeState(isel)
{
iselect=isel;
if(isel==0)
{
document.form1.lstat1.disabled=true;
document.form1.lstat1.style.backgroundColor="#E2E2E4";
document.form1.lstat2.disabled=true;
document.form1.lstat2.style.backgroundColor="#E2E2E4";
c_value("s1","#FF0000");
c_value("s2","#000000");
c_value("s3","#000000");
}
else if(isel==1)
{
document.form1.lstat1.disabled="";
document.form1.lstat1.style.backgroundColor="#FFFFFF";
document.form1.lstat2.disabled=true;
document.form1.lstat2.style.backgroundColor="#E2E2E4";
c_value("s2","#FF0000");
c_value("s1","#000000");
c_value("s3","#000000");
}
else
{
document.form1.lstat1.disabled=true;
document.form1.lstat1.style.backgroundColor="#E2E2E4";
document.form1.lstat2.disabled="";
document.form1.lstat2.style.backgroundColor="#FFFFFF";
c_value("s3","#FF0000");
c_value("s2","#000000");
c_value("s1","#000000");
}
}
</script>
<body bgcolor="#C0C0C0" topmargin="5" leftmargin="5" onload="on_init()" oncontextmenu="self.event.returnValue=false">
<form name="form1">
<table border="2" width="100%" height="100%" bordercolor="#A5A5A5" bordercolorlight="#A5A5A5"
bordercolordark="#A5A5A5" cellspacing="0" cellpadding="5">
<tr>
<td width="100%" bgcolor="#C3C3C3" height="10%"><table border="0" width="100%">
<tr>
<td width="50%"><strong>在线状态设置</strong></td>
<td width="50%" align="right"><input type="button" value="关闭窗口" onclick="window.close()"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%" bgcolor="#E2E2E4" valign="top">
<table border="0" width="100%" height="147">
<tr>
<td width="100%" height="27"><input type="radio" value="0" checked name="selstat" onclick="changeState(0)"><font name="s1"><b>上线</b></font></td>
</tr>
<tr>
<td width="100%" height="14"><input type="radio" name="selstat" value="1" onclick="changeState(1)"><font name="s2"><b>暂时离开</b></font></td>
</tr>
<tr>
<td width="100%" height="14"> <font color="#808080">自动回复:</font><select size="1" name="lstat1" style="background-color: #E2E2E4;" disabled>
<option value="1">接个电话,请等等。</option>
<option value="2">我去吃饭了,一会再回来。</option>
<option value="3">我有点事,暂时离开一下。</option>
<option value="4">热恋中,请勿打搅。</option>
<option value="5">专心赌钱中,请勿打搅。</option>
</select></td>
</tr>
<tr>
<td width="100%" height="14"><input type="radio" name="selstat" value="2" onclick="changeState(2)"><font name="s3"><b>自定义暂时离开</b></font></td>
</tr>
<tr>
<td width="100%" height="27"> <font color="#808080">自动回复:</font><input type="text" name="lstat2" size="34" maxlength="30" style="background-color: #E2E2E4;" disabled></td>
</tr>
<tr>
<td width="100%" height="27" align="center"><br><br><input type="button" value="确 定" onclick="click_ok()">
<input type="button" value="取 消" onclick="window.close()"></td>
</tr>
</table>
<p><br>
<br>
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -