【发布时间】:2013-07-26 02:17:19
【问题描述】:
我目前正在尝试编写聊天,但我的这段代码无法按我想要的方式运行。
$("#chat").focus(function() {
$(document).keypress(function(e) {
if (e.which == 13) {
$.post("send.php",
{
chat: $("#chat").val()
}
);
}
});
});
“send.php”有效。页面重新加载,它不应该这样做并且我的值被删除。
希望得到您的帮助。 谢谢你的期待!
【问题讨论】:
标签: php jquery mysql ajax chat