function responseAdvice(msgid,userid){
var textid="rep_text_"+msgid;
var statusid="status_"+msgid;
var content=document.getElementById(textid).value;
if(content==""){
alert("不能为空");
return;
}
var timestamp = Date.parse(new Date());
var encoded={
"userid":userid,
"content":content,
"time":timestamp,
"message_id":msgid
}
var jsonstr=JSON.stringify(encoded);
$.ajax({
type:'post',
url:'__URL__/response_advice',
data:
{
"jsondata":jsonstr
},
dataType:'json',
success:function(json){
document.getElementById(statusid).innerHTML=1;
}
});
}