您好,欢迎访问一九零五行业门户网

php中怎么接收Ajax POST数据

php中如何接收ajax post数据
本帖最后由 u011547588 于 2015-04-04 19:01:44 编辑
正在加载联系人
ctrl+enter
发送

/**
* 发送信息/获取信息
*/
// 清除定时器
function clearchattimers(id){
if(id){
//请除指定用户定时执行
if(apchattimers[id]){
cleartimeout(apchattimers[id]);
loadflag = false;
// console.log('clear:'+apchattimers[id]);
}
}else{
//请除所有用户定时执行
for (var i=0;i0){
var _scrollheight = $('.dialog-comment-list').find('li').last().offset().top;
$(#post-reply).closest('.site-im-dialog').find('.dialog-comment-list').animate({zoom:1},function(){
$(.dialog-comment-list-box).data('jsp').scrollto(0, _scrollheight);
});
}
$(#post-reply).removeattr('disabled');
clearinputmessage();
clearchattimers(0);
getprivatemessages(uid);
}else{
tipsop(json.msg,'error');
$(#post-reply).removeattr('disabled');
}
},'json');
}

返回    {msg:\u53d1\u9001\u6210\u529f,status:1,data:[]}
单击发送或 ctrl+enter 按钮不抬起 (如图)
如何才能单击发送按钮或者按ctrl+enter    把数据post到php处理 求php代码
------解决思路----------------------
执行 $.post('index.php?do=webim',{action:'send_messages',uid:uid,smessage:message} ... 后
php 得到
$_get['do'] 为 webim
$_post['action'] 为 send_messages
$_post['uid'] 为 uid 的值
$_post['smessage'] 为 message 的值
其它类似信息

推荐信息