⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 system.htm

📁 Csharp版聊天室,初步了解.NET 网络编程
💻 HTM
📖 第 1 页 / 共 3 页
字号:
		     for(var i=0;i<mcount;i++)
		     {
		          if(mlist[i].indexOf(id)!=-1)
		          {
		              name=mlist[i].split("|"); 
		              return String(name[1]); 
		          }
		      }  
		     return String("head1.gif");
		}
	
		function print_ms(tp,suf,sayid,touf,toid,saypress,saycolor,sayms,times)
		{
		    switch(tp)
		    {
		       case "toall":
		          sayname=parent.h0.getname(sayid);
		          toname=parent.h0.getname(toid);
		          if(sayms.indexOf("##")<0)
		          {
		              allms="<img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\"><a href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+sayid+"');return false;\">"+sayname+"</a><font color=\"#ff0000\">"+saypress+"</font>对<img src=\"images/head/"+touf+"\" height=\"14\" width=\"14\"><a href=href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+toid+"');return false;\">"+toname+"</a>说:<font color=\""+saycolor+"\">"+sayms+"</font> &nbsp; &nbsp;  <font color=\"#0000ff\">"+times+"</font>";
		          }
		          else
		          {
		              allms=sayms.replace(/##/g,"<img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\"><a href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+sayid+"');return false;\">"+sayname+"</a>");
		              allms=allms.replace(/%%/g,"<img src=\"images/head/"+touf+"\" height=\"14\" width=\"14\"><a href=href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+toid+"');return false;\">"+toname+"</a>");
		              allms="<font color=\"#ff0000\">"+allms+"</font>";
		          }
		          break;
		       case "toonly":
		          sayname=parent.h0.getname(sayid);
		          toname=parent.h0.getname(toid);
		          if(sayms.indexOf("##")<0)
		          {
		              allms="<font color=\"red\">◆[密谈]</font><img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\"><a href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+sayid+"');return false;\">"+sayname+"</a><font color=\"#ff0000\">"+saypress+"</font>对<img src=\"images/head/"+touf+"\" height=\"14\" width=\"14\"><a href=href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+toid+"');return false;\">"+toname+"</a>说:<font color=\""+saycolor+"\">"+sayms+"</font> &nbsp; &nbsp;  <font color=\"#0000ff\">"+times+"</font>";
		          }
		          else
		          {
		              allms=sayms.replace(/##/g,"<img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\"><a href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+sayid+"');return false;\">"+sayname+"</a>");
		              allms=allms.replace(/%%/g,"<img src=\"images/head/"+touf+"\" height=\"14\" width=\"14\"><a href=href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+toid+"');return false;\">"+toname+"</a>");
		              allms="◆[密谈]"+allms;
		              allms="<font color=\"#ff0000\">"+allms+"</font>";
		          }
		          break;
		       case "in":
		          reload_mlist();
		          sayname=parent.h0.getname(sayid);
		          allms="<img src=\"images/sys.gif\">欢迎<img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\"><a href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+sayid+"');return false;\">"+toid+"</a><font color=\"#ff0000\">加入!!!</font> &nbsp; &nbsp;  <font color=\"#0000ff\">"+times+"</font>";
		          break;
		       case "del":
		          reload_mlist();
		          if(sayms!="")
		             sayms="("+sayms+")";
		          allms="<img src=\"images/sys.gif\"><img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\">"+sayname+"<font color=\"#ff0000\">离开了聊天室"+sayms+"!!!</font> &nbsp; &nbsp;  <font color=\"#0000ff\">"+times+"</font>";
		          break;
		       case "change":
		          reload_mlist();
		          allms="<img src=\"images/sys.gif\"><img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\">"+sayms+"改名为:<img src=\"images/head/"+touf+"\" height=\"14\" width=\"14\"><font color=\"#ff0000\">"+toid+"!!!</font> &nbsp; &nbsp;  <font color=\"#0000ff\">"+times+"</font>";
		          break;
		       default:
		          sayname=parent.h0.getname(sayid);
		          toname=parent.h0.getname(toid);
		          allms="<img src=\"images/head/"+suf+"\" height=\"14\" width=\"14\"><a href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+sayid+"');return false;\">"+sayname+"</a><font color=\"#ff0000\">"+saypress+"</font>对<img src=\"images/head/"+touf+"\" height=\"14\" width=\"14\"><a href=href=\"#\" onclick=\"javascript:parent.h0.addtobody('"+toid+"');return false;\">"+toname+"</a>说:<font color=\""+saycolor+"\">"+sayms+"</font> &nbsp; &nbsp;  <font color=\"#0000ff\">"+times+"</font>";
		          break;    
		    }
		
                    if(sayid==myid || toid==myid)
                    {
		        parent.show1.document.writeln("<div width=\"100%\" style=\"background-color:#ECFAFF\" class=\"gb12\" height=\"16\">"+allms+"</div>");
                    }
                    else
                    {
		        parent.show1.document.writeln("<div width=\"100%\" class=\"gb12\" height=\"16\">"+allms+"</div>");
                    }
			
					
			//parent.show1.document.writeln(allms+"<br>");	
		    parent.show1.scroll(0, 64000);
		}
		
		function addtobody(id)
		{
		    nstormchat_timeout=1200;
		    if(id=="大家") 
		    {
		        parent.nstormchat_toid="大家";
		        parent.nstormchat_toname="大家";
		        parent.nstormchat_toface="head1.gif";
		        parent.send.word1.value="大家";
		        parent.send.word7.focus();
		        return;
		    }
		   if(id!=myid)
		   {
		       var name,lv,lt;
		       var mlist=parent.nstormchat_memeber;
		       var mcount=mlist.length;
		       for(var i=0;i<mcount;i++)
		       {
		          if(mlist[i].indexOf(id)!=-1)
		          {
		              name=mlist[i].split("|");
		              parent.nstormchat_toid=id;
		              parent.nstormchat_toname=name[2];
		              parent.nstormchat_toface=name[1];
		              var listnum=parent.send.word1.all.length;
		              var fl=false;
		              var num=0;
		              for(var j=0;j<listnum;j++)
		              {
		                  lt=parent.send.word1.children[j].value;
		                  if(lt.indexOf(id)!=-1) 
		                  {
		                     fl=true;
		                     num=j;
		                     break;
		                   }
		              }
		              if(fl)
		              {
		                  parent.send.word1.children[num].selected=true;
		              }
		              else
		              {
		                  var oOption = parent.send.document.createElement("OPTION");
                          oOption.text = getname(id);
                          oOption.value =id;
                          parent.send.word1.options.add(oOption);
                          parent.send.word1.children[listnum].selected=true;
		              }
		              parent.send.word7.focus();
		              return; 
		          }
		       } 
		     }
		     parent.send.word7.focus();
		     return;
		}
		
		function autoreload_show()
		{
		    if(parent.send.word11.checked==true)
		    {
		        myautors=setTimeout("parent.h0.reload_show()",300000);
		    }
		    else
		    {
		        clearTimeout(myautors);
		    }
		}
		
        function autogetword()
        {
            setTimeout("parent.h2.location.reload();autogetword();",2000);
        }
        
        
		function setsubmit(v0, v1, v2, v3, v4, v5, v6, v7)
        {
            document.postwords.v0.value = v0;
	        document.postwords.v1.value = v1;
	        document.postwords.v2.value = v2;
	        document.postwords.v3.value = v3;
	        document.postwords.v4.value = v4;
	        document.postwords.v5.value = v5;
	        document.postwords.v6.value = v6;
	        document.postwords.v7.value = v7;
        }
        
        
        function changems(uname,usex,uhead)
        {
            nstormchat_timeout=1200;
            if(uname!="" && (parent.nstormchat_username!=uname || parent.nstormchat_usersex!=usex || parent.nstormchat_userface!=uhead))
            {
             uname=uname.replace(/ /g,"");
             document.chms.m0.value = parent.nstormchat_userface;
             document.chms.m1.value = parent.nstormchat_username;
             parent.nstormchat_username=uname;
             parent.nstormchat_usersex=usex;
             parent.nstormchat_userface=uhead;
             parent.send.word0.value=uname;
             document.chms.m3.value = uname;
             document.chms.m2.value = uhead;
             document.chms.m4.value = usex;
             document.chms.submit();    
             }
        }
        
        function reload_show()
        {
            parent.show1.document.close();
            nstormchat_timeout=1200;
            load_show();
        }
		
        function closechat()
        {
           parent.show1.document.close();
           parent.h1.location.href="exit.aspx?id=1";
        }
		    load_show();
		    load_send();
		    load_list();
		    timeline();
		    parent.h2.location.href="getms.aspx";
		    autogetword();
		    parent.send.word7.focus();
		</script>
	</HEAD>
	<body>
		<form id="postwords" name="postwords" method="post" action="addmsg.aspx" target="h1">
			<input id="v0" type="hidden" name="v0" /> <input id="v1" type="hidden" name="v1" />
			<input id="v2" type="hidden" name="v2" /> <input id="v3" type="hidden" name="v3" />
			<input id="v4" type="hidden" name="v4" /> <input id="v5" type="hidden" name="v5" />
			<input id="v6" type="hidden" name="v6" /> <input id="v7" type="hidden" name="v7" />
		</form>
		<form id="chms" name="chms" method="post" action="changms.aspx" target="h1">
			<input id="m0" type="hidden" name="m0" /> <input id="m1" type="hidden" name="m1" />
			<input id="m2" type="hidden" name="m2" /> <input id="m3" type="hidden" name="m3" />
			<input id="m4" type="hidden" name="m4" />
		</form>
	</body>
</HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -