时间:2021-07-01 10:21:17 帮助过:18人阅读
<?php
echo json_encode(array(array(
'liaotiantiao'=>$liaotiantiao,
'liaotiank'=>$liaotiank,
'chatuserid'=>$chatuserid,
'chattouserid'=>$chattouserid
)));
?>
html 文件
代码如下:
$(document).ready(function(){
//默认条聊天条聊天框状态
$.post('/index.php/chat/morenltt',{},function(val){
var obj=eval(val);
alert(obj[0].chatuserid);
});
});