文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>JavaScript实例 实现聊天室在线人员无刷新

JavaScript实例 实现聊天室在线人员无刷新

时间:2007-02-17  来源:PHP爱好者

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~```
ASP精品屋 此只为实现无刷新的JavaScript客户端所需要的相似技术
具体要跟程序结合起来。 by 探索者
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'~~
index.htm
<script>

function renewlook()
{
list.document.open();
list.document.close();
list.document.write("<HTML><HEAD><TITLE>聊天室</TITLE><style type=text/css>body, form, td, input,
select, textarea {font: 9pt 宋体,Arial;}s</style></HEAD><body bgcolor=ffffff>");
}
function writeStr(tempStr)
{
list.document.write(tempStr);
}
</script>
<FRAMESET ROWS="*,60" FRAMEBORDER="0" BORDER="false">
<frameset cols="*,102" frameborder="auto" border="0" framespacing="0">
<FRAME SRC="show.htm" scrolling="auto" name=list>
<frame name="rightFrame" scrolling="AUTO" noresize src="about:blank">
</frameset>
<frameset cols="0,1*" frameborder="NO" border="0" framespacing="0">
<frame cols="0,0" name="hiddenframe" scrolling="NO" noresize src="about:blank">
<FRAME SRC="o.htm" SCROLLING="no" name=talk>
<frame cols="0,0" name="frshow" scrolling="NO" noresize src="about:blank">
</frameset>
</frameset><noframes>
</noframes>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~```
ASP精品屋 此只为实现无刷新的JavaScript客户端所需要的相似技术
具体要跟程序结合起来。 by 探索者
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'~~
index.htm
<script>

function renewlook()
{
list.document.open();
list.document.close();
list.document.write("<HTML><HEAD><TITLE>聊天室</TITLE><style type=text/css>body, form, td, input,
select, textarea {font: 9pt 宋体,Arial;}s</style></HEAD><body bgcolor=ffffff>");
}
function writeStr(tempStr)
{
list.document.write(tempStr);
}
</script>
<FRAMESET ROWS="*,60" FRAMEBORDER="0" BORDER="false">
<frameset cols="*,102" frameborder="auto" border="0" framespacing="0">
<FRAME SRC="show.htm" scrolling="auto" name=list>
<frame name="rightFrame" scrolling="AUTO" noresize src="about:blank">
</frameset>
<frameset cols="0,1*" frameborder="NO" border="0" framespacing="0">
<frame cols="0,0" name="hiddenframe" scrolling="NO" noresize src="about:blank">
<FRAME SRC="o.htm" SCROLLING="no" name=talk>
<frame cols="0,0" name="frshow" scrolling="NO" noresize src="about:blank">
</frameset>
</frameset><noframes>
</noframes>
o.htm

<script>
var n;
n=2;
top.renewlook();
top.writeStr("<div id=div0 name=div0>dkeoo3</div><div id=div1 name=div1>222222222</div>");
//opener.t11.innerHTML="<font onclick=javascript:opener.writeStr('ddds');>ddd</font>";
top.writeStr('写1');
top.writeStr('写2');
top.writeStr('写3');
var i=0;
function showsss()
{
//top.list.eval('div' + i).style.display='block';
eval("top.list."+"div"+i+".style.display='block';");
i=i+1
if (i>=n)
{
i=0;
top.list.div0.style.display='none';
}
else
{
eval("top.list."+"div"+i+".style.display='none';");
}
setTimeout("showsss();",900);
}
showsss();
</script>
<font onclick="javascript:top.writeStr('<div name=div'+n+' id=div'+n+'>'+n+'</div>');n=n+1;">
ddd
</font>
<font color=ff0000 onclick="top.list.div5.style.display='none';">o.htm</font>
<font color=ff0000 onclick="top.list.div5.style.display='block';">o.htm</font>
dddddddddddddddddd

show.htm

<div name=div0 id=div0></div>
<div name=t11 id=t11><table>
<tr><td>测试</td></tr></table>
</div>
<script>

function renewlook()
{
document.open();
document.close();
document.write("<HTML><HEAD><TITLE>聊天室</TITLE><style type=text/css>body, form, td, input,
select, textarea {font: 9pt 宋体,Arial;}s</style></HEAD><body bgcolor=ffffff>");
}
function writeStr(tempStr)
{
document.write(tempStr);
}

t11.style.display="none";
t11.style.display="block";
//t11.onclick="window.close();document.write('dd');";
writeStr("<font style='cursor:hand' onclick=t11.style.display='block';>显示</font>");
</script>


php爱好者站 http://www.phpfans.net 网页制作|网站建设|数据采集.
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载