in the message frame: ------------------------------- message.php: <form action="postmsg.php" target="display" method="post"> <input type="text" name="msg" size="30" maxlength="50"> <input type="submit" value="POST"> </form> -----------------------------in the display frame:------------------------- postmsg.php: <?php //codes to add messages into DB header('location:display.php'); ?>display.php: //show the messages------------------------- this will be inefficient when there are too many messages...
如果是聊天内容框架刷新的话不行的,刷新效果太明显了。介意你使用ajax ---------------------------------I agree,in ajax you can use "innerHTML+=" as you can get less data from db.in asp,it is so easy to create a chatroom using application without db.
-------------------------------
message.php:
<form action="postmsg.php" target="display" method="post">
<input type="text" name="msg" size="30" maxlength="50">
<input type="submit" value="POST">
</form>
-----------------------------in the display frame:-------------------------
postmsg.php:
<?php
//codes to add messages into DB
header('location:display.php');
?>display.php:
//show the messages-------------------------
this will be inefficient when there are too many messages...
---------------------------------I agree,in ajax you can use "innerHTML+=" as you can get less data from db.in asp,it is so easy to create a chatroom using application without db.