求救,聊天室刷新是怎么做的 输入框写为这样:<body onload="document.all.txt.focus()"> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 输入框写为这样:<body onload="document.all.txt.focus()"><input type="text" name="txt" id="txt" value="输入框"> 帅哥,你简直太伟大了,刷新的问题帮我解决一下阿。我不想用那个html的那个刷新,那个带屏闪的,不好,还有我显示聊天内容的时候是用的这个方法<html><head><title>ÁÄÌì</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><link type="text/css" rel="stylesheet" href="../css/style.css"></head><body bgcolor="#FFFFFF" text="#000000" ><table width="90%" border=0 cellpadding=0 cellspacing=1 align="center"> <tbody> <script language='JavaScript'><!--var autoScrollOn = 1;var scrollOnFunction;var scrollOffFunction;function scrollWindow(){if ( autoScrollOn == 1 ){this.scroll(0,65000);setTimeout('scrollWindow()', 200);}}function scrollOn(){autoScrollOn = 1;scrollWindow();}function scrollOff(){autoScrollOn = 0;}function StartUp(){this.onblur = scrollOnFunction;this.onfocus = scrollOffFunction;scrollWindow();}scrollOnFunction = new Function('scrollOn()')scrollOffFunction = new Function('scrollOff()')StartUp();// --></script> <? //echo $ID; //exit; include("../inc/conn.php"); $sql="SELECT * FROM gx_syjl where yxdID='$yxID' order by sysj desc"; //echo $sql; //exit; $result = mysql_query($sql);if ($result){ while ($r=mysql_fetch_array($result)) { $syr=$r["syr"]; $synr=$r["synr"]; echo"<tr>"; echo"<td align='left'><front size='1'>$syr ˵µÀ£º$synr</front></td>"; echo"</tr>"; }}else { echo "¶Ô²»Æð£¬ÏµÍ³¹ÊÕÏ£¡"; mysql_free_result($result); }?> <tr bgcolor="#7285cf"> <td height=2 align=left> </td> </tr> </tbody> </table></body></html>我发现这种方法,显示的内容是把刚发出的内容放在最上面,能不能把发完的放在最下面啊,这样可以随着滚动而走啊 function scrollWindow(){if ( autoScrollOn == 1 ){this.scroll(0,65000);setTimeout('scrollWindow()', 200);}}的this.scroll(0,65000);改成this.scroll(65000,0);把输出的内容改成 输出=新+输出 怎么让smarty不解释模板中的部份代码? javascript中空值的判断问题? 关于ADODB 新手问个sql语句 马上给分 !!! 谢谢 alert(document.1.aa.value)提示undefined,其中1是form表单的name,急急急 求助,关于PHP编写网页挂机程序 朝花夕拾旧难重提:汉字替换无法正常,总是乱码。 一个关于下载的小问题,在线等 oracle的问题 新手 PDO连接数据库! 那位大哥帮帮忙啊,请问哪有下PHP编的联系人地址本的代码啊??(Mysql支持)急需啊~~ 郁闷,成了文字编辑,散分!
<html>
<head>
<title>ÁÄÌì</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link type="text/css" rel="stylesheet" href="../css/style.css"></head>
<body bgcolor="#FFFFFF" text="#000000" >
<table width="90%" border=0 cellpadding=0 cellspacing=1 align="center">
<tbody>
<script language='JavaScript'>
<!--
var autoScrollOn = 1;
var scrollOnFunction;
var scrollOffFunction;function scrollWindow(){
if ( autoScrollOn == 1 ){
this.scroll(0,65000);
setTimeout('scrollWindow()', 200);
}}function scrollOn(){
autoScrollOn = 1;
scrollWindow();}function scrollOff(){
autoScrollOn = 0;}function StartUp(){
this.onblur = scrollOnFunction;
this.onfocus = scrollOffFunction;
scrollWindow();}scrollOnFunction = new Function('scrollOn()')
scrollOffFunction = new Function('scrollOff()')
StartUp();
// -->
</script> <?
//echo $ID;
//exit;
include("../inc/conn.php");
$sql="SELECT * FROM gx_syjl where yxdID='$yxID' order by sysj desc";
//echo $sql;
//exit;
$result = mysql_query($sql);
if ($result)
{
while ($r=mysql_fetch_array($result))
{
$syr=$r["syr"];
$synr=$r["synr"];
echo"<tr>";
echo"<td align='left'><front size='1'>$syr ˵µÀ£º$synr</front></td>";
echo"</tr>";
}
}
else
{
echo "¶Ô²»Æð£¬ÏµÍ³¹ÊÕÏ£¡";
mysql_free_result($result);
}?>
<tr bgcolor="#7285cf">
<td height=2 align=left> </td>
</tr>
</tbody>
</table>
</body>
</html>
我发现这种方法,显示的内容是把刚发出的内容放在最上面,能不能把发完的放在最下面啊,这样可以随着滚动而走啊
if ( autoScrollOn == 1 ){
this.scroll(0,65000);
setTimeout('scrollWindow()', 200);
}}
的this.scroll(0,65000);改成this.scroll(65000,0);把输出的内容改成 输出=新+输出