<script language=javascript>
var ns = (navigator.appName == 'Netscape') ? true : false;
var timeRun=false;
var timeID;
var intervalRun=true;
var intervalId;function chatScroll(){
this.scroll(0,9999999);
if(timeRun) clearTimeout(timeID);
timeID=setTimeout('chatScroll()',500);
timeRun=true;
}
function scrollStop(){
if(timeRun) {clearTimeout(timeID); timeRun=false;}
else chatScroll();
}
function rop(){
top.showMember();
setTimeout('rop()',10000);
}function as(cname){
var name=top.trim(cname);parent.addShow(name);
}
function ds(cname){
var name=top.trim(cname);parent.delShow(name);
}
function onerror(aaa,bbb,ccc){
alert(aaa+'\n'+bbb+'\n'+ccc);
}
function test_say(channel){
if(parent.stext.say_onload) {
if(intervalRun) {
clearInterval(intervalId);
intervalRun=false
}
parent.stext.set_channel(channel);
}
}
chatScroll();
rop();
document.onkeydown=kdown;
function kdown(){
if (event.keyCode==78&&event.ctrlKey)
return false;
}
</script>
<html>
<meta http-equiv="refresh" content="5;url=<?echo $PHP_SELF;?>">
<meta content="text/html; charset=gb2312" http-equiv=Content-Type>
<body bgcolor=white leftmargin=0 topmargin=0 marginheight=0 marginwidth=0>
<?
if(!file_exists("messages.html")){
echo "<h2><b><font color=navy>   祝贺您成为本聊天室的第一位聊友</font></b></h2></body></html>";
exit;
}
$open_file=fopen("messages.html", "r");
$message_array=file("messages.html");
$counter=count($message_array);
for($i=0; $i<=$counter; $i++) {
echo "$message_array[$i]","<br>";
}
fclose($open_file);
?>
</body>
</html>

解决方案 »

  1.   

    嗯,老师,滚动条倒是好用了,但是<script language=javascript>是不是用java编写的呢?我的机器不能用。总是有一个错误提示:出现运行期错误,第18行,对象不支持此属性或方法。我每次都是点“否”,才可以运行。怎么办?
      

  2.   

    那就把
    top.showMember();
    去掉吧。